官术网_书友最值得收藏!

X-axis scaling

In a nutshell, x-axis scaling is accomplished by running multiple instances of an application or a service. In most cases, there is a load balancer on top that makes sure that the traffic is shared among all those instances. The biggest advantage of x-axis scaling is simplicity. All we have to do is deploy the same application on multiple servers. For that reason, this is the most commonly used type of scaling. However, it comes with its set of disadvantages when applied to monolithic applications.

Having a large application usually requires a big cache that demands heavy usage of memory. When such an application is multiplied, everything is multiplied with it, including the cache. Another, often more important, problem is an inappropriate usage of resources. Performance issues are almost never related to the whole application. Not all modules are equally affected, and, yet, we multiply everything. That means that even though we could be better off by scaling only part of the application that requires such an action, we scale everything. Nevertheless, x- axis scaling is important no matter the architecture. The major difference is the effect that such a scaling has.

Figure 2-2: Monolithic application scaled inside a cluster

By using microservices, we are not removing the need for x-axis scaling but making sure that due to their architecture such scaling has more effect than with alternative and more traditional approaches to architecture. With microservices, we have the option to fine-tune scaling. We can have many instances of services that suffer a lot under heavy load and only a few instances of those that are used less often or require fewer resources. On top of that, since they are small, we might never reach a limit of a service. A small service in a big server would need to receive a truly massive amount of traffic before the need for scaling arises. Scaling microservices is more often related to fault tolerance than performance problems. We want to have multiple copies running so that, if one of them dies, the others can take over until recovery is performed.

主站蜘蛛池模板: 辽宁省| 临西县| 翁牛特旗| 什邡市| 尼木县| 新安县| 潜山县| 海丰县| 定陶县| 林甸县| 丰县| 华阴市| 福贡县| 铜山县| 无棣县| 平邑县| 正镶白旗| 梁山县| 东乌珠穆沁旗| 页游| 易门县| 桂东县| 溧阳市| 恩施市| 兴义市| 秦皇岛市| 东明县| 沙坪坝区| 庆城县| 宜兰市| 砀山县| 锦屏县| 方正县| 大同市| 阳曲县| 乌拉特后旗| 明星| 阳泉市| 延吉市| 临泉县| 北票市|