The document summarizes a presentation given on microservices architecture using Spring Cloud and Netflix OSS. It defines microservices as structuring an application as loosely coupled services organized by business capabilities. Key benefits include faster deployments, independent scalability, and greater resiliency. Challenges include overall complexity in distributed systems with latency, faults, and operational overhead. The presentation demonstrates how to create microservices using Spring Boot and leverage Netflix OSS libraries for service discovery, load balancing, and resiliency patterns. Best practices emphasized testing services for resiliency under various error conditions.
1. SPRING CLOUD
MICROSERVICES WITH
NETFLIX OSS
BOSTON JAVA MEETUP, CAMBRIDGE, MA
NOVEMBER 12, 2019
Miya W Longwe
Founder of Ezcloud Technologis Inc,
mlongwe@gmail.com
2. @mlongwe
PRESENTATION GOAL
Define the Microservice Architecture
Explain what that means and why it
matters
Review implementation using Spring
Cloud and Neflix OSS
5. AGENDA
A brief refresher on software architecture
The journey monolith to microservices
Microservices != silver bullet
Applying the microservice pattern language
@mlongwe
6. ABOUT SOFTWARE
ARCHITECTURE
“The software architecture of a computing system is the
set of structures needed to reason about the system,
which comprise software elements, relations among
them, and properties of both.”
Documenting Software Architectures, Bass et al
17. The microservice architecture
is an architectural style
that structures an
application as a
set of loosely coupled,
services organized around
business capabilities
21. Concept -> Service Dependency Graph
Your
App/Service
Service X
Service Y
Service Z
Service L
Service M
22. CHARACTERISTICS
Many smaller (fine grained), clearly scoped services
Single Responsibility Principle
Domain Driven Development
Bounded Context
Independently Managed
Clear ownership for each service
Typically need/adopt the “DevOps” model
Attribution: Adrian Cockroft, Martin Fowler …
23. WHY?
Faster and simpler deployments and rollbacks
Independent Speed of Delivery (by different teams)
Right framework/tool/language for each domain
Recommendation component using Python?, Catalog Service in Java ..
Greater Resiliency
Fault Isolation
Better Availability
If architected right
31. SERVICE DISCOVERY
• 100s of Micro-Services
• Need a Service Metadata Registry (Discovery Service)
Account Service Catalog
Service
Recommendation
Service
Customer Service
Service
X
Service Y
Service
Z
Service
Registry
Service
(e.g. Netflix Eureka)
32. Central (Proxy) Loadbalancer
Account Service Load
Balancer
Account Service 1
Recommendation
Service 1
Customer Service
Service 1
API Gateway
Account Service N
Recommendation
Service N
Customer Service
Service N
Customer Service Load
Balancer
Reco Service
Load Balancer
37. CHALLENGES - SUMMARY
• Service Discovery
• Operational Overhead (100s of services; DevOps model absolutely required)
• Distributed Systems are inherently Complex
• N/W Latency, Fault Tolerance, Serialization overhead ..
• Service Interface Versioning, Mismatches?
• Testing (Need the entire ecosystem to test)
• Fan out of Requests -> Increases n/w traffic
42. Takeaways
• Monolithic apps – good for small organizations
• MicroServices – have its challenges, but the benefits are many
• Consider adopting when your organization scales
• Leverage Best Practices
• An Elastic Cloud provides the ideal environment (Auto Scaling etc.)
• NetflixOSS has many libraries/samples to aid you