SlideShare a Scribd company logo
Microservice architecture with
Spring Cloud and Netflix OSS
Who am I?
Denis Danov
Software Engineer
&
Consultant at Dreamix Ltd.
www.dreamix.eu
Microservices with Spring Cloud and Netflix OSS
Microservices with Spring Cloud and Netflix OSS
Microservice architecture introduction
o What is a microservice?
o How to develop microservices?
o Microservice properties
n Small and singly focused
n Loosly-coupled and simple
n Technology agnostic
n Independent deployable units
o Distributed system
n Patterns common to all distributed systems
lead to boilerplate code
n configuration management, service
discovery, circuit breakers, intelligent
routing, messaging service etc.
o Spring Boot
n Simple infrastructure
n Few dependencies
n REST integrated
n Messaging support
n Uniform operations and metrics
n Logging
n Simple deployment
o Spring Cloud
n Distributed/versioned
configuration
n Service registration and
discovery
n Routing
n Service-to-service calls
n Load balancing
n Circuit Breakers
n Distributed messaging
o Netflix OSS
n Archaius
n Eureka
n Zuul
n Feign
n Ribbon
n Hystrix
Simple application
Production ready
o Having your code done is not the
same as production ready.
o You have to think how to monitor
your application metric in
production.
o Spring Actuator exposes
applciation metric which can be
sent and displayed from another
tool such as Graphite
Architecture components
We have our microservice now it
needs a good environment to live in
Spring Cloud Dependency
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-
dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
o The 12 Factor manifesto talks
about externalizing that which
changes from one environment to
another from the application itself
o Cloud Config Server takes care to
centralize, externalize, and
dynamically update application
configuration.
Configuration
Microservices with Spring Cloud and Netflix OSS
Key points
o Server:
n Dependency:
spring-cloud-config-server
n Annotation:
@EnableConfigServer
@SpringBootApplication
public class CloudConfigApplication
o Client:
n Dependency:
spring-cloud-starter-config
n Properties:
Specify config server address
o In the cloud, services are often
ephemeral and it's important to
be able to talk to these services
abstractly, without worrying about
the host and ports for these
services.
o Eureka
Service Discovery
Microservices with Spring Cloud and Netflix OSS
Key points
o Server:
n Dependency:
spring-cloud-starter-eureka-server
n Annotation:
@EnableEurekaServer
@SpringBootApplication
public class DiscoveryApplication
o Client:
n Dependency:
spring-cloud-starter-eureka
n Annotation:
@EnableDiscoveryClient
n Properties:
Specify eureka server address
Change config address to service name
o Edge services sit as intermediaries
between the clients and the service.
o Proxy requests from an edge-service
to mid-tier services with a
microproxy.
o API gateways are used whenever a
client - like a mobile phone or HTML5
client - requires API translation.
o Zuul, Ribbon, Spring Retry
Edge Services: API gateways
Microservices with Spring Cloud and Netflix OSS
Key points
o Server:
n Dependency:
spring-cloud-starter-zuul - proxy
spring-cloud-starter-feign - HTTP REST client
n Annotation:
@EnableZuulProxy
@EnableDiscoveryClient
@SpringBootApplication
public class ApiGatewayApplication
@FeignClient("team-mservice")
public interface CompanyClient
o Log aggregation and analysis.
o Essential part of microservice
environment.
o ELK=Elastic+Logstash+Kibana
o Logback
Logging
Microservices with Spring Cloud and Netflix OSS
o Distributed tracing lets us trace
the path of a request from one
service to another.
o It's very useful in understanding
where a failure is occurring in a
complex chain of calls.
o Zipkin server and Sleuth
Distributed tracing
Microservices with Spring Cloud and Netflix OSS
Key points
o Server:
n Dependency:
zipkin-server
zipkin-autoconfigure-ui
n Annotation:
@EnableZipkinServer
o Client:
n Dependency:
spring-cloud-starter-sleuth
spring-cloud-starter-zipkin
n Configuration:
ZipkinSpanReporter Bean
o We often assume that services
will always be up and responding
to requests.
o We need to be a bit more
defensive in any code that
connects to other services.
o There have to be a usefull fallback
mechanism
o Hystrix
Resilience, circuit-breaker
Microservices with Spring Cloud and Netflix OSS
Key points
o Server:
n Dependency:
spring-cloud-starter-hystrix-dashboard
n Annotation:
@EnableHystrixDashboard
o Client:
n Dependency:
spring-cloud-starter-hystrix
spring-boot-starter-actuator
n Configuration:
@HystrixCommand(fallbackMethod = "fallback")
o All this is a long process of
discovery.
o Capture all this in your Maven
starter with auto-configuration
o It is not needed to reinvent the
wheel.
o There are different log
aggregation and analysis
alternatives:
n EKK=Elastic+Kinesis+Kibana (AWS)
n Graylog - nice alerts
Alternatives
Kubernetes/Kubeflix
o Language and technology agnostic
o Reduces the need for:
n discovery service
n client-side loadbalancing
n edge-service proxy
JHipster microservices
Resources
o https://github.com/dndanoff/microservices
o 12 Factor Application
o Spring Cloud Project
o Spring Cloud Docs
Microservices with Spring Cloud and Netflix OSS

More Related Content

PDF
Spring Cloud and Netflix OSS overview v1
PDF
Microservices with Java, Spring Boot and Spring Cloud
PDF
Spring Cloud Netflix OSS
PDF
Microservices with Spring Cloud
PDF
Building ‘Bootiful’ microservices cloud
PDF
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
PDF
Microservice With Spring Boot and Spring Cloud
PDF
Stop reinventing the wheel with Istio by Mete Atamel (Google)
Spring Cloud and Netflix OSS overview v1
Microservices with Java, Spring Boot and Spring Cloud
Spring Cloud Netflix OSS
Microservices with Spring Cloud
Building ‘Bootiful’ microservices cloud
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
Microservice With Spring Boot and Spring Cloud
Stop reinventing the wheel with Istio by Mete Atamel (Google)

What's hot (20)

PDF
Microservices with Netflix OSS and Spring Cloud - Dev Day Orange
PPTX
Cloud Native Spring - The role of Spring Cloud after Kubernetes became a main...
PDF
Istio presentation jhug
PPTX
Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud - An...
PDF
Cloud Native Microservices with Spring Cloud
PDF
Istio on Kubernetes
PPTX
An Open-Source Platform to Connect, Manage, and Secure Microservices
PDF
The elegant way of implementing microservices with istio
PPTX
istio: service mesh for all
PDF
Java Microservices with Netflix OSS & Spring
PPTX
Spring Cloud and Netflix Components
PPTX
Building Cloud Native Applications Using Spring Boot and Spring Cloud
PDF
Service discovery in mesos miguel, Angel Guillen
PDF
Application Rollout - Istio
PDF
Lagom in Practice
ODP
Istio
PDF
Javantura v4 - (Spring)Boot your application on Red Hat middleware stack - Al...
PDF
Managing traffic routing with istio and envoy workshop
 
PPTX
Multi-Clusters Made Easy with Liqo:‹Getting Rid of Your Clusters Keeping Them...
PPTX
Gatekeeper: API gateway
Microservices with Netflix OSS and Spring Cloud - Dev Day Orange
Cloud Native Spring - The role of Spring Cloud after Kubernetes became a main...
Istio presentation jhug
Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud - An...
Cloud Native Microservices with Spring Cloud
Istio on Kubernetes
An Open-Source Platform to Connect, Manage, and Secure Microservices
The elegant way of implementing microservices with istio
istio: service mesh for all
Java Microservices with Netflix OSS & Spring
Spring Cloud and Netflix Components
Building Cloud Native Applications Using Spring Boot and Spring Cloud
Service discovery in mesos miguel, Angel Guillen
Application Rollout - Istio
Lagom in Practice
Istio
Javantura v4 - (Spring)Boot your application on Red Hat middleware stack - Al...
Managing traffic routing with istio and envoy workshop
 
Multi-Clusters Made Easy with Liqo:‹Getting Rid of Your Clusters Keeping Them...
Gatekeeper: API gateway
Ad

Similar to Microservices with Spring Cloud and Netflix OSS (20)

PDF
All About Microservices and OpenSource Microservice Frameworks
PDF
Open Source Networking Days- Service Mesh
PDF
Microservice Powered Orchestration
PPTX
Microservices
PDF
What is a Service Mesh and what can it do for your Microservices
PDF
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
PDF
Api observability
PPTX
MRA AMA Part 10: Kubernetes and the Microservices Reference Architecture
PDF
The what, why and how of knative
PDF
Service Mesh in Practice
PDF
Managing microservices with Istio Service Mesh
PDF
Openshift serverless Solution
PDF
Building a Service Mesh with Envoy (Kubecon May 2018)
PDF
Getting Started with Kubernetes and Consul
PDF
SDN & NFV Introduction - Open Source Data Center Networking
PDF
Network Virtualization & Software-defined Networking
PDF
Micro Service Architecture
PPTX
Cloudify: Open vCPE Design Concepts and Multi-Cloud Orchestration
PPTX
Yotpo microservices
PDF
A1 from n tier to soa
All About Microservices and OpenSource Microservice Frameworks
Open Source Networking Days- Service Mesh
Microservice Powered Orchestration
Microservices
What is a Service Mesh and what can it do for your Microservices
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
Api observability
MRA AMA Part 10: Kubernetes and the Microservices Reference Architecture
The what, why and how of knative
Service Mesh in Practice
Managing microservices with Istio Service Mesh
Openshift serverless Solution
Building a Service Mesh with Envoy (Kubecon May 2018)
Getting Started with Kubernetes and Consul
SDN & NFV Introduction - Open Source Data Center Networking
Network Virtualization & Software-defined Networking
Micro Service Architecture
Cloudify: Open vCPE Design Concepts and Multi-Cloud Orchestration
Yotpo microservices
A1 from n tier to soa
Ad

Recently uploaded (20)

PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Essential Infomation Tech presentation.pptx
PDF
Nekopoi APK 2025 free lastest update
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
medical staffing services at VALiNTRY
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
System and Network Administraation Chapter 3
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
2025 Textile ERP Trends: SAP, Odoo & Oracle
Wondershare Filmora 15 Crack With Activation Key [2025
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
VVF-Customer-Presentation2025-Ver1.9.pptx
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Design an Analysis of Algorithms II-SECS-1021-03
How Creative Agencies Leverage Project Management Software.pdf
Essential Infomation Tech presentation.pptx
Nekopoi APK 2025 free lastest update
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Softaken Excel to vCard Converter Software.pdf
How to Migrate SBCGlobal Email to Yahoo Easily
PTS Company Brochure 2025 (1).pdf.......
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
medical staffing services at VALiNTRY
Design an Analysis of Algorithms I-SECS-1021-03
System and Network Administraation Chapter 3

Microservices with Spring Cloud and Netflix OSS

  • 2. Who am I? Denis Danov Software Engineer & Consultant at Dreamix Ltd. www.dreamix.eu
  • 6. o What is a microservice? o How to develop microservices?
  • 7. o Microservice properties n Small and singly focused n Loosly-coupled and simple n Technology agnostic n Independent deployable units o Distributed system n Patterns common to all distributed systems lead to boilerplate code n configuration management, service discovery, circuit breakers, intelligent routing, messaging service etc.
  • 8. o Spring Boot n Simple infrastructure n Few dependencies n REST integrated n Messaging support n Uniform operations and metrics n Logging n Simple deployment
  • 9. o Spring Cloud n Distributed/versioned configuration n Service registration and discovery n Routing n Service-to-service calls n Load balancing n Circuit Breakers n Distributed messaging o Netflix OSS n Archaius n Eureka n Zuul n Feign n Ribbon n Hystrix
  • 11. Production ready o Having your code done is not the same as production ready. o You have to think how to monitor your application metric in production. o Spring Actuator exposes applciation metric which can be sent and displayed from another tool such as Graphite
  • 12. Architecture components We have our microservice now it needs a good environment to live in
  • 14. o The 12 Factor manifesto talks about externalizing that which changes from one environment to another from the application itself o Cloud Config Server takes care to centralize, externalize, and dynamically update application configuration. Configuration
  • 16. Key points o Server: n Dependency: spring-cloud-config-server n Annotation: @EnableConfigServer @SpringBootApplication public class CloudConfigApplication o Client: n Dependency: spring-cloud-starter-config n Properties: Specify config server address
  • 17. o In the cloud, services are often ephemeral and it's important to be able to talk to these services abstractly, without worrying about the host and ports for these services. o Eureka Service Discovery
  • 19. Key points o Server: n Dependency: spring-cloud-starter-eureka-server n Annotation: @EnableEurekaServer @SpringBootApplication public class DiscoveryApplication o Client: n Dependency: spring-cloud-starter-eureka n Annotation: @EnableDiscoveryClient n Properties: Specify eureka server address Change config address to service name
  • 20. o Edge services sit as intermediaries between the clients and the service. o Proxy requests from an edge-service to mid-tier services with a microproxy. o API gateways are used whenever a client - like a mobile phone or HTML5 client - requires API translation. o Zuul, Ribbon, Spring Retry Edge Services: API gateways
  • 22. Key points o Server: n Dependency: spring-cloud-starter-zuul - proxy spring-cloud-starter-feign - HTTP REST client n Annotation: @EnableZuulProxy @EnableDiscoveryClient @SpringBootApplication public class ApiGatewayApplication @FeignClient("team-mservice") public interface CompanyClient
  • 23. o Log aggregation and analysis. o Essential part of microservice environment. o ELK=Elastic+Logstash+Kibana o Logback Logging
  • 25. o Distributed tracing lets us trace the path of a request from one service to another. o It's very useful in understanding where a failure is occurring in a complex chain of calls. o Zipkin server and Sleuth Distributed tracing
  • 27. Key points o Server: n Dependency: zipkin-server zipkin-autoconfigure-ui n Annotation: @EnableZipkinServer o Client: n Dependency: spring-cloud-starter-sleuth spring-cloud-starter-zipkin n Configuration: ZipkinSpanReporter Bean
  • 28. o We often assume that services will always be up and responding to requests. o We need to be a bit more defensive in any code that connects to other services. o There have to be a usefull fallback mechanism o Hystrix Resilience, circuit-breaker
  • 30. Key points o Server: n Dependency: spring-cloud-starter-hystrix-dashboard n Annotation: @EnableHystrixDashboard o Client: n Dependency: spring-cloud-starter-hystrix spring-boot-starter-actuator n Configuration: @HystrixCommand(fallbackMethod = "fallback")
  • 31. o All this is a long process of discovery. o Capture all this in your Maven starter with auto-configuration o It is not needed to reinvent the wheel.
  • 32. o There are different log aggregation and analysis alternatives: n EKK=Elastic+Kinesis+Kibana (AWS) n Graylog - nice alerts Alternatives
  • 33. Kubernetes/Kubeflix o Language and technology agnostic o Reduces the need for: n discovery service n client-side loadbalancing n edge-service proxy
  • 35. Resources o https://github.com/dndanoff/microservices o 12 Factor Application o Spring Cloud Project o Spring Cloud Docs