Java-Interview-Advanced/docs/distributed-system/system-dilatation.md

13 lines
788 B
Markdown
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

如果访问量扩大10倍如何扩容
网关直接多部署10倍的机器即可前面的Nginx做会负载均衡把流量均匀分发给各个网关机器
服务扩容,都很简单的,多加机器,部署启动,自动注册到注册中心里去,此时其他服务会自动感知到你的服务多加了一些机器
服务实例变多了10倍此时几十个服务实例几百个服务实例对eureka机器会造成每秒几百请求没问题eureka机器8核16G的配置单机抗上千请求很轻松
数据库本来是每秒几百请求10倍每秒高峰期是三四千请求横向扩容很麻烦此时可以考虑给单个数据库部署的机器提高配置32核128G高配物理机每秒钟抗几千请求问题不大