2. What is Application Architecture?
The process of defining a structured solution that
meets all of the technical and operational
requirements, while optimizing common quality
attributes such as performance, security, and
manageability.
4. Scalability
Scale cube
Y axis - functional decomposition
Splitting different things
X axis - horizontal duplication
cloning
Z axis - data partitioning
Splitting similar things
5. Maintainability
• Simple to modify
• Easy to find solutions for bugs
• Decrease the participation cost
• Decrease maintenance effort
12. Monolithic Architecture Drawbacks
For Large Applications
• High participation cost
• Overloaded IDE
• Continuous deployment is difficult
• Scaling the application can be difficult
• Obstacle to scaling development
• Requires a long-term commitment to a technology
stack
15. What are Microservices?
• Split the application into set of smaller, loosely
coupled services.
• Each microservice is a mini‑application that has
its own architecture consisting of business logic
along with various adapters.
• Some microservices would expose an API that’s
consumed by other microservices or by the
application’s clients. Other microservices might
implement a web UI.
17. Key Principles of Microservices Architecture
• Services communication Protocol (ex: REST, SOAP or
AMQP)
• Client interaction
• Database distribution per microservice
• Scalability per microservice
• Service discovery mechanism
• Data inter-services passing (ex: Security token)
18. Microservices Architecture Benefits
• Better testability
• Continuous deployment is simple
• Better team management
• Less participation cost
• Faster IDE
• Improved fault isolation
• Each service can be scaled independently
• Eliminates any long-term commitment to a technology stack
21. Microservices Architecture Drawbacks
Partitioned Database
• Update multiple databases owned by different
services, where distributed transactions is usually
not an option
• Different kinds of databases
• Rollback mechanism
• Relational queries
• Consistency … Consistency … Consistency
23. Microservices Architecture Drawbacks - Partitioned Database
Event‑Driven Architecture
Order
Service
Customers
Service
Id Credit LimitId Customer Id Status
Message
Broker
Order Created
Credit Reserved
Order Published
24. Microservices Architecture Drawbacks - Partitioned Database
Event‑Driven Architecture
Order
Service
Customers
Service
Id Credit LimitId Customer Id Status
Message
Broker
Order Created
Credit Limit Exceeded
Order Declined
25. Microservices Architecture Drawbacks - Partitioned Database
Event‑Sourcing Architecture
Command Query Responsibility Segregation (CQRS)
Order
Service
Customers
Service
Id Event Type State
Order Created
Order
Approved
Add Events
Find Events
Subscribe to Events
26. Microservices Architecture Drawbacks
Multiple client endpoints
• The mismatch between the needs of the client and the
fine‑grained APIs exposed by each of the microservices
• Different clients need different data
• Network performance is different for different types of
clients
• Service instances and their locations (host+port)
changes dynamically
• Services might use a diverse set of protocols
29. Microservices Architecture Drawbacks
Service discovery
• Each instance of a service exposes a remote API such
as HTTP/REST. at a particular location (host and port)
• The number of services instances and their locations
changes dynamically.
• Virtual machines and containers are usually assigned
dynamic IP addresses.
• The number of services instances might vary
dynamically. For example, an EC2 Autoscaling Group
adjusts the number of instances based on load.
31. Microservices Architecture Drawbacks - Service discovery
Server-side service discovery
Service
Client
Customers
Service
Order
Service
Router
Service
Registry
Query
32. Microservices Architecture Drawbacks - Service discovery
Client-side service discovery
Service
Client
Customers
Service
Order
Service
Service
Registry
Query
Registry
Aware Http
Client