Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Microservices forscale

962 views

Published on

Eureka + zuul based micro services demo and deployment using docker

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Microservices forscale

  1. 1. Micro services Deepak Singhvi 11-01-17
  2. 2. X Axis Horizontal Scaling (Scale by cloning) Y Axis Functional Decomposition (Scale by splitting Different things) Z Axis Data Partitioning (Scale by splitting similar things) Scale! Near infinite scale No split, and single monolithic architecture.
  3. 3. Scalability - Resource usage should increase linearly (or better) with load. - Design for 10x growth in data, traffic, users, etc. Availability - Resilience to failure - Graceful degradation - Recoverability from failure Latency - User experience latency - Data latency Manageability - Simplicity - Maintainability - Diagnostics Cost - Development effort and complexity - Operational cost Inspiration from Randy Shoup
  4. 4. “Architectural Strategies Strategy 1: Partition Everything How do you eat an elephant? One bite at a time. Strategy 2: Async Everything Good things comes to one who waits… Strategy 3: Automate Everything Give a man a fish and he eats the fish for a day… Teach a man to fish and he eats fist everyday Strategy 4: Remember Everything fails Be Prepared
  5. 5. Partitioning Business Service Micro services small set of services which works collectively as a single (or multiple as well) unit. Micro services highly decoupled and focus on doing a small task at a time. Any kind of communication with between services would require a knowledge about each other’s location. If we have multiple environments (dev, sit, uat, prod) then configuring, managing, deploying the services challenging if it is not automated as it involves issues in deployment time, monitoring. Adding additional nodes for the services in the distributed environment would need better management and collaboration.
  6. 6. How do we do it… There are number of tools are technology. For this study I have taken Spring + Netflix components. Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems. Netflix OSS is a set of frameworks and libraries that Netflix wrote to solve some interesting distributed-systems. Netflix open source has contribute many project to spring cloud tools.
  7. 7. Components Spring Cloud + Netflix Eureka + Netflix Zuul + Ribbon + Feing + Docker
  8. 8. Lets jump to demo and code
  9. 9. Who is who Eureka Eureka, Netflix OSS project, is a service registry. Each micro service registers itself with Eureka, and then consumers of that service know how to find it using the service directory. Zuul Zuul is the front door for all requests, as an edge service application. Zuul is built to enable dynamic routing, monitoring, resiliency and security. Ribbon Ribbon is a Inter Process Communication (remote procedure calls) library with built in software load balancers. Feing Feign is a declarative web service client. It makes writing web service clients easier Docker Docker is an open-source project that automates the deployment of applications inside software containers..
  10. 10. You can download code from github https://github.com/deepaksinghvi/microservice
  11. 11. Thank You!

×