请分析对于关系型数据库来说,为什么纵向扩展会遇到瓶颈?横向扩展需要解决何种问题

请分析对于关系型数据库来说,为什么纵向扩展会遇到瓶颈?横向扩展需要解决何种问题,第1张

纵向扩展指的是增加单个数据库服务器的性能,这包括增加内存、磁盘空间、CPU 等资源。这种扩展方式会遇到瓶颈,是因为单台数据库服务器的性能有限,总有一天会达到极限。

横向扩展指的是增加多台数据库服务器,将数据分布在多台服务器上。这种扩展方式需要解决如何在多台服务器之间进行数据同步、如何确保数据的一致性、如何处理负载均衡等问题。横向扩展能够提高数据库的性能和可扩展性,但也带来了更多的复杂性。

你有一台API服务器,每天几百万次请求,吃不消了。现在要提升性能:

横向扩展:多增加几台API服务器,一起服务。

纵向扩展:把API服务器换成性能更好的机器。

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.

1、横向扩展,是已扩展服务器的数量进行高并发的处理(增强处理业务的能力)根据配置nginx的反向代理,转发服务器(配置的ip)进行轮换处理业务(可加入负载均衡器进行分发请求)。

2、纵向扩展,是增加单机的处理能力,一般增加cpu的处理能力。

你有一台API服务器,每天几百万次请求,吃不消了。现在要提升性能:

横向扩展:多增加几台API服务器,一起服务。

纵向扩展:把API服务器换成性能更好的机器。


欢迎分享,转载请注明来源:夏雨云

原文地址:https://www.xiayuyun.com/zonghe/528617.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-06-23
下一篇2023-06-23

发表评论

登录后才能评论

评论列表(0条)

    保存