3D Scaling Microservices

After reading some articles on the advantages and disadvantages of micro service architecture MSA, I would like to highlight other aspects that it presents for flexible orchestration, controlling the scalability of the cloud infrastructure, and choreography - which describes the interaction between several services and dynamic traffic management (traffic engineering )
image

The term "Microservice Architecture" has emerged over the past few years to describe a particular way of developing software applications developed and deployed independently of each other. While there is no clear definition of this architectural style, there are certain common characteristics inherent in it: automated deployment and decentralized management of its components and data.

In short, this architectural style is an approach to developing a single application as a set of small services, each of which works in its own process and communicates with services, often using the HTTP REST API. There is an absolute minimum of centralized management of these services, which can be written in different programming languages ​​and use various storage technologies.

Monolithic applications can be very successful, although more and more people feel extremely disappointed, especially when these applications are deployed in the cloud. After making changes in a small part of the application, you need to rebuild the entire monolith and redeploy it in the cloud. Over time, it is often difficult to maintain a good modular structure of the application, after changes that should affect only one module, which increases the overhead cost of maintaining the product.

Scalability: Flat vs 3D


Horizontal scaling (X-axis scaling) allows you to run only many instances of the entire application, and not the part that requires a larger resource, behind the load balancer. If there are N copies of the application, then each copy processes 1 / N of the load. This is a simple and frequently used scaling approach. One of the drawbacks of this approach is that since each copy potentially accesses all the data in order to be effective, caches require more memory. Another problem with this approach is that it does not take into account the subsequent development and increase in application complexity.

Vertical scaling- increase the productivity of each component of the system in order to increase overall productivity. Scalability in this context means the ability to replace components in an existing computing system with more powerful and faster ones as requirements grow and technology develops. This is the easiest way to scale, as it does not require any changes to applications running on such systems.

Parametric scaling(Z-axis scaling) - each instance executes an identical copy of the code. In this regard, it is similar to (X-axis scaling). The big difference is that each server is only responsible for its own subset of data. Some component of the system is responsible for routing each request to the corresponding instance. One of the routing criteria is usually a request attribute, another common routing criterion is the type of client. (Z-axis scaling) has a number of advantages and are usually used to scale databases. Each instance deals only with its own subset of data. This improves cache utilization and reduces the use of I / O traffic, and improves transaction scalability, as requests are typically distributed across multiple instances. Moreover,

Functional scaling (Y-axis scaling) in contrast to (X-axis and Z-axis), which consist of several working identical copies of the application, the latter type of scaling splits the application into several different services. Each service is responsible for one or more functions, interacting with each other. There are several different ways for the functional decomposition of the application, but this is the topic of a separate article ...

The integrated application of all three types of scaling allows not only to solve the problems of developing and increasing the complexity of applications, but also significantly improve the performance and efficiency of using your infrastructure.

Service Orchestration and Choreography


Technologies that describe the behavioral model of the interaction of services, including a sequence of actions and relationships between the various types of services that determine the business process. There are two ways to build this process: orchestration and choreography of services.

image

Orchestration is a single centralized executable business process (Orchestrator) that coordinates the interaction between different services. Orchestrator is responsible for calling and combining services. The relationships between all participating services are described by one composite service endpoint. Orchestration involves managing transactions between individual services. Orchestration uses a centralized approach to the composition of services.

image

Choreography describes the interaction between several services, while orchestration represents control from the perspective of one of the parties. Choreography differs from orchestration in the arrangement of logic, which controls the interaction between services. Choreography is a global description of the participating services, which is determined by the exchange of messages, rules of interaction and agreements between two or more services, and uses a decentralized approach to the composition of services.

Also popular now: