Professional Documents
Culture Documents
bdd2021 Arsitekturaplikasimodern 210405024500
bdd2021 Arsitekturaplikasimodern 210405024500
bdd2021 Arsitekturaplikasimodern 210405024500
make_purchase()
All these round trip in 1 API call is, make this a tightly coupled architecture. Disadvantage:
• Wait Time
• Prone to network disruption
• Unable to scale efficiently
Base Architecture
Web Layer Business Layer DB Layer
Server 1
https
Server 2
Step 1: Hairpin your architecture
Web Layer Business Layer DB Layer
http
https tcp
Business Layer
http
https tcp
Step 2: Introduce buffering mechanism
Introduce a way to make your layers independent of each other
make_purchase()
make_purchase()
Now to Microservices
Step 3: Loosely Coupled to Microservices
What is Microservices
Cart Orders
Web Front
End
Account
From Loosely coupled to Microservices
Start with (ideally) new service
Cart Orders
Web Front
End
Account
RegisteredUser
RegisteredUserDB
From Loosely coupled to Microservices
Then attack the low hanging fruits
Orders
Web Front
End
Account
RegisteredUser UserCart
RegisteredUserDB UserCartDB
From Loosely coupled to Microservices
Web Layer Business Layer
Orders
Account
Web Front
End
RegisteredUser
UserCart
Then again and again
Until all services are converted to
microservices
Microservices and Containers
Benefit of going containerized
Up in seconds
Spinning up container is
much faster than VM
Containers in Action
Web Layer Business Layer DB Layer
make_purchase()
Pros Cons
Smaller and faster deployments: Smaller codebases and scope = Testing is difficult: Testing a microservices-based application can be
quicker deployments, which also allow you to start to explore the cumbersome.
benefits of Continuous Deployment.
Scalability: Since your services are separate, you can more easily Debugging problems can be harder: Each service has its own set of
scale the most needed ones at the appropriate times, as opposed to logs to go through. Log, logs, and more logs.
the whole application.
Ease of understanding: With added simplicity, developers can better Large vs small product companies: Microservices are great for large
understand the functionality of a service companies, but can be slower to implement and too complicated for
small companies
SUMMARY