你有一臺API服務(wù)器学密,每天幾百萬次請求淘衙,吃不消了。現(xiàn)在要提升性能:
橫向擴(kuò)展:多增加幾臺API服務(wù)器腻暮,一起服務(wù)彤守。
縱向擴(kuò)展:把API服務(wù)器換成性能更好的機(jī)器。
-
橫向擴(kuò)展
也叫水平擴(kuò)展
哭靖,用更多的節(jié)點支撐更大量的請求具垫。 如成千上萬的螞蟻完成一項搬運工作 -
縱向擴(kuò)展
又叫垂直擴(kuò)展
,擴(kuò)展一個點的能力支撐更大的請求试幽。如利用1個人的能力筝蚕,如蜘蛛俠逼停火車
Scale horizontally vs. vertically
Methods of adding more resources for a particular application fall into two broad categories
Scale horizontally (scale out)
To scale horizontally (or scale out) means to add more nodes to a system, such as adding a new computer to a distributed software application. An example might be scaling out from one Web server system to three.
As computer prices drop and performance continues to increase, low cost "commodity" systems can be used for high performance computing applications such as seismic analysis and biotechnology workloads that could in the past only be handled by supercomputers. Hundreds of small computers may be configured in a cluster to obtain aggregate computing power that often exceeds that of single traditional RISC processor based scientific computers. This model has further been fueled by the availability of high performance interconnects such asMyrinet and InfiniBand technologies. It has also led to demand for features such as remote maintenance and batch processing management previously not available for "commodity" systems.
The scale-out model has created an increased demand for shared data storage with very high I/O performance, especially where processing of large amounts of data is required, such as in seismic analysis. This has fueled the development of new storage technologies such as object storage devices.
Scale out solutions for database servers generally seek to move toward a shared nothing architecture going down the path blazed by Google of sharding.
Scale vertically (scale up)
To scale vertically (or scale up) means to add resources to a single node in a system, typically involving the addition of CPUs or memory to a single computer. Such vertical scaling of existing systems also enables them to use virtualization technology more effectively, as it provides more resources for the hosted set of operating system and application modules to share.
Taking advantage of such resources can also be called "scaling up", such as expanding the number of Apachedaemon processes currently running.