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
- Resource usage should increase linearly (or better) with load.
- Design for 10x growth in data, traffic, users, etc.
- Resilience to failure
- Graceful degradation
- Recoverability from failure
- User experience latency
- Data latency
- Development effort and complexity
- Operational cost
Inspiration from Randy Shoup
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
Partitioning Business Service
Micro services small set of services which works collectively as a single (or multiple as well)
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
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.
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
Who is who
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
Zuul is the front door for all
requests, as an edge service
application. Zuul is built to
enable dynamic routing,
monitoring, resiliency and
Ribbon is a Inter Process
procedure calls) library with
built in software load
Feign is a declarative web
service client. It makes
writing web service clients
Docker is an open-source
project that automates the
deployment of applications
inside software containers..
You can download code from github