Microservices architecture design using Zuul and Eureka - part 1
What are microservices?
Microservices - also known as the microservice architecture - is an architectural style that structures an application as a collection of loosely coupled services, which implement business capabilities. The microservice architecture enables the continuous delivery/deployment of large, complex applications. It also enables an organization to evolve its technology stack.
There are 2 approaches for app development:
-
Monolithic Architecture - Single deployable unit containing all other unit like UI, Service etc
-
MicroService Architecture - Every module is different independent deployable unit and connected each other by rest API
Monolithic Architecture - Single deployable unit containing all other unit like UI, Service etc
MicroService Architecture - Every module is different independent deployable unit and connected each other by rest API
Benefits
This solution has a number of benefits:
-
Each microservice is relatively small
-
Easier for a developer to understand
-
The IDE is faster making developers more productive
-
The application starts faster, which makes developers more productive, and speeds up deployments
-
Each service can be deployed independently of other services - easier to deploy new versions of services frequently
-
Easier to scale development. It enables you to organize the development effort around multiple teams. Each (two pizza) team is owns and is responsible for one or more single service. Each team can develop, deploy and scale their services independently of all of the other teams.
-
Improved fault isolation. For example, if there is a memory leak in one service then only that service will be affected. The other services will continue to handle requests. In comparison, one misbehaving component of a monolithic architecture can bring down the entire system.
-
Each service can be developed and deployed independently
-
Eliminates any long-term commitment to a technology stack. When developing a new service you can pick a new technology stack. Similarly, when making major changes to an existing service you can rewrite it using a new technology stack.
Each microservice is relatively small
- Easier for a developer to understand
- The IDE is faster making developers more productive
- The application starts faster, which makes developers more productive, and speeds up deployments
Each service can be deployed independently of other services - easier to deploy new versions of services frequently
Easier to scale development. It enables you to organize the development effort around multiple teams. Each (two pizza) team is owns and is responsible for one or more single service. Each team can develop, deploy and scale their services independently of all of the other teams.
Improved fault isolation. For example, if there is a memory leak in one service then only that service will be affected. The other services will continue to handle requests. In comparison, one misbehaving component of a monolithic architecture can bring down the entire system.
Each service can be developed and deployed independently
Eliminates any long-term commitment to a technology stack. When developing a new service you can pick a new technology stack. Similarly, when making major changes to an existing service you can rewrite it using a new technology stack.
Zuul
Zuul is the front door for all requests from devices and web sites to the backend of the Netflix streaming application. As an edge service application, Zuul is built to enable dynamic routing, monitoring, resiliency and security. It also has the ability to route requests to multiple Amazon Auto Scaling Groups as appropriate.
Zuul Benefits:
-
Authentication and Security - identifying authentication requirements for each resource and rejecting requests that do not satisfy them.
-
Insights and Monitoring - tracking meaningful data and statistics at the edge in order to give us an accurate view of production.
-
Dynamic Routing - dynamically routing requests to different backend clusters as needed.
-
Stress Testing - gradually increasing the traffic to a cluster in order to gauge performance.
-
Load Shedding - allocating capacity for each type of request and dropping requests that go over the limit.
-
Static Response handling - building some responses directly at the edge instead of forwarding them to an internal cluster
-
Multiregion Resiliency - routing requests across AWS regions in order to diversify our ELB usage and move our edge closer to our members
Authentication and Security - identifying authentication requirements for each resource and rejecting requests that do not satisfy them.
Insights and Monitoring - tracking meaningful data and statistics at the edge in order to give us an accurate view of production.
Dynamic Routing - dynamically routing requests to different backend clusters as needed.
Stress Testing - gradually increasing the traffic to a cluster in order to gauge performance.
Load Shedding - allocating capacity for each type of request and dropping requests that go over the limit.
Static Response handling - building some responses directly at the edge instead of forwarding them to an internal cluster
Multiregion Resiliency - routing requests across AWS regions in order to diversify our ELB usage and move our edge closer to our members
No comments:
Post a Comment