原文: 如何把应用从单机扩展到分布式
单台服务器应用

问题:由于流量越来越大,出现服务器性能问题。
应用服务器和数据服务器分离

对架构增加了一台服务器,应用和数据库分别部署到不同的服务器上,对于开发和测试没有任何影响。有效的缓解了应用服务器负载的压力。
问题:随着请求流量的进一步增大,出现应用服务器性能问题。
应用服务器集群

网络请求出现了缓解。
问题:1. 需要使用session+cookie维护用户;2.如何做请求转发(cdn,前端做负载均衡器)
负载均衡器

- 负载均衡器优化了访问请求在服务器组之间的分配,消除了服务器之间的负载不平衡,从而提高了系统的反应速度与总体性能。
- 负载均衡器可以对服务器的运行状况进行监控,及时发现运行异常的服务器,并将访问请求转移到其他可以正常工作的服务器上,从而提高服务器组的可靠性。
- 采用了负载均衡器以后,可以根据业务量的发展情况灵活增加服务器,系统的扩展能力得到提高,同时简化了管理。
问题:随着流量的新增,数据库服务器有性能压力,数据库遇到瓶颈。
数据库服务器集群

问题:1. 数据库读写分离;2.数据库数据同步;3.数据库路由
搜索引擎集群

问题:搜索引擎的索引数据如何同步,实时增量or定时全量?
缓存服务器

用户是没有上限的,缓存、限流、降级
数据库水平/垂直拆分

应用服务器垂直拆分

根据不同域名请求访问不同服务器,
问题:应用服务器交互调用问题
SOA服务(分布式服务)

网友评论