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

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.

主站蜘蛛池模板: 临西县| 洛浦县| 开原市| 金塔县| 凤山县| 临颍县| 宿迁市| 延吉市| 平陆县| 惠安县| 合水县| 上犹县| 丁青县| 莱州市| 喀喇沁旗| 浪卡子县| 休宁县| 左云县| 成都市| 航空| 通化市| 沅江市| 哈密市| 遵化市| 山阴县| 韶山市| 古浪县| 额济纳旗| 新乡县| 酒泉市| 东乌珠穆沁旗| 金乡县| 济宁市| 菏泽市| 江阴市| 商丘市| 五寨县| 大理市| 东莞市| 莱州市| 明溪县|