[服务器开发]可伸缩系统的设计模式(译)
Scalable System Design Patterns
可伸缩系统的设计模式
Ricky Ho在他的博客中分享了该文章,该文章是一个简单的概括分享,详细的可以参见他博客的其它详细文章。下面主要是意译。
1、Load Balancer:负载均衡 – 由分发者来决定哪个工作者处理下一个请求,这种决定可以基于不同的策略。“In this model, there is a dispatcher that determines which worker instance will handle the request based on different policies. The application should best be "stateless" so any worker instance can handle the request.
This pattern is deployed in almost every medium to large web site setup.”
该模式中,由分发器来决定哪个工作者来处理请求。应用最好是无状态的,以使任何一个工作者都能同等处理请求。几乎所有的中大型网站都应用了负载均衡器这个模式。
”In this model, the dispatcher multicast the request to all workers of the pool. Each worker will compute a local result and send it back to the dispatcher, who will consolidate them into a single response and then send back to the client.
This pattern is used in Search engines like Yahoo, Google to handle users keyword search request ... etc.“
该模式中,分发者将请求转发给池中的所有工作者,每个工作者处理请求的一部分并返回给分发器,分发器工作者返回的结果加工组合为一个响应返回给客户端。该模式在搜索引擎中使用处理用户的关键字,如Yahoo、Google。
“In this model, the dispatcher will first lookup if the request has been made before and try to find the previous result to return, in order to save the actual execution.
This pattern is commonly used in large enterprise application. Memcached is a very commonly deployed cache server.”
该模式,只是在分发器处理时加了一步查询结果缓存(译注:类似浏览器缓存),如果之前已经处理过并且可以使用之前的缓存,就返回之前的处理结果节省处理时间!该模式通常使用在大型企业应用。Memcached就是一个常用的cache服务器。
“This model also known as "Blackboard"; all workers monitors information from the shared space and contributes partial knowledge back to the blackboard. The information is continuously enriched until a solution is reached.
This pattern is used in JavaSpace and also commercial product GigaSpace.”
这个模式也叫“黑板模式”。就是在处理流程中,存在一个全局传递的对象,它可能包含了请求参数、中间状态、响应结果等各种信息,供流程中的各个组件对其进行操作。该模式在JavaSpace(译注:JavaSpaces技术是进行分布式计算的一种简单机制)和GigaSpace(译注:是一个虚拟化的中间件层)中都有使用。
“This model is also known as "Data Flow Programming"; all workers connected by pipes where data is flow across.
This pattern is a very common EAI pattern.”
这个模式也叫“面向数据流编程”,是很通用的企业集成模式。
“The model is targeting batch jobs where disk I/O is the major bottleneck. It use a distributed file system so that disk I/O can be done in parallel.
This pattern is used in many of Googles internal application, as well as implemented in open source Hadoop parallel processing framework. I also find this pattern can be used in many many application design scenarios.”
这个模式使用分布式文件系统,这样磁盘可以并行I/O。Google内部许多应用程序使用了这个模式。Hadoop就是基于MapReduce的一个实现。
7、Bulk Synchronous Parellel:批量同步并行 – 所有工作者一个接一个的执行,由主控来进行协调。
“This model is based on lock-step execution across all workers, coordinated by a master. Each worker repeat the following steps until the exit condition is reached, when there is no more active workers.
1) Each worker read data from input queue
2) Each worker perform local processing based on the read data
3) Each worker push local result along its direct connection
This pattern has been used in Googles Pregel graph processing model as well as the Apache Hama project.”
该模型基于一个master协调,所有的worker同步(lock-step)执行。
该模式被用于Google Pregel Graph Processing google-pregel-graph-processing和Hama。
“This model is based on an intelligent scheduler / orchestrator to schedule ready-to-run tasks (based on a dependency graph) across a clusters of dumb workers.
This pattern is used in Microsofts Dryad project”
该模式基于一个智能调度者/管理者在一群工作者之间调配可运行任务。该模式在微软的:Microsoft’s Dryad project中使用。
快速梳理常用的设计模式(中篇) 本文旨在快速梳理常用的设计模式,了解每个模式主要针对的是哪些情况以及其基础特征,每个模式前都有列举出一个或多个可以深入阅读的参考网页,以供读者详细了解其实现。 分为三篇文章: 上篇:设计模式基础理念和创建型设计模式 中篇:行为型设计模式 下篇:结构型设计模式
设计模式在业务系统中的应用 本文的重点在于说明工作中所使用的设计模式,为了能够更好的理解设计模式,首先简单介绍一下业务场景。使用设计模式,可以简化代码、提高扩展性、可维护性和复用性。有哪些设计模式,这里就不再介绍了,网上很多,本文只介绍所用到设计模式。
相关文章
- 华为超聚变2288H V5 服务器安装Windows系统后 PCI数据捕获和信号处理控制器 出现感叹号
- python远程登录服务器(paramiko模块安装和使用)
- 解决公司服务器加入域中不能启动应用系统的问题
- 优化服务器的性能方案设计
- 基于Darwin实现的分布式流媒体直播服务器系统
- 基于Darwin实现的分布式流媒体直播服务器系统
- dell 服务器系统安装及RAID配置
- C# 视频监控系列(3):客户端——连接服务器并预览
- 无法读取此系统上以前注册的服务器的列表。请在“已注册的服务器”窗口中重新注册您的服务器
- 【STM32F429】第8章 ThreadX NetXDUO之TCP服务器
- 如何通过 ABAP RFC 远程函数调用来跨系统消费远端服务器的 ABAP 函数试读版
- Netweaver 服务器和客户端TLS版本号不匹配的解决方案
- 资源编排最佳实践之入门篇:云服务器如何从1到N?
- Atiitt cdn技术总结 性能提升之道 目录 1. 组成 最简单的CDN网络由一个DNS服务器和几台缓存服务器组成:1 1.1. CDN是一个经策略性部署的整体系统,包括分布式存储、负载均衡
- WebSocket服务器TransactionID_SiteDetailMap的析构工作
- Eclipse — 更改包名后导致服务器启动报异常
- 【已解决最详细】failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.服务器下载不了
- 【华为云技术分享】选择困难症必看!云服务器操作系统选择技巧+经验
- OpenCV5(C++)版本docker容器服务器配置分享
- Linux系统shell脚本之批量修改服务器密码
- Linux系统之部署Rsyslog 日志服务器
- 通过tar命令将现有的系统打包成docker容器,用于构建镜像文件 将服务器文件上传到docker 本机制作成docker镜像 本机制作成镜像
- 1.1 下载安装mysql数据库服务器
- 02 从头开始atac项目 ubuntu20 install r4.2 Linux系统环境配置 服务器版本的rstudio r install in linux /ubuntu/centos