跨多个核心/服务器扩展 Node.JS [英] Scaling Node.JS across multiple cores / servers
问题描述
好的,所以我有一个想法我想仔细阅读,但在此之前我需要完全理解一些事情.
Ok so I have an idea I want to peruse but before I do I need to understand a few things fully.
首先,我认为我将继续使用该系统的方式是拥有 3 个服务器,如下所述:
Firstly the way I think im going to go ahead with this system is to have 3 Server which are described below:
第一台服务器将是我的网络前端,这是将侦听连接并响应客户端的服务器,该服务器将有 8 个内核和 16GB拉姆.
The First Server will be my web Front End, this is the server that will be listening for connection and responding to clients, this server will have 8 cores and 16GB Ram.
第二台服务器将是数据库服务器,非常不言自明,连接到主机并设置/获取数据.
The Second Server will be the Database Server, pretty self explanatory really, connect to the host and set / get data.
第三台服务器将是我的存储服务器,这将是可下载文件的存储位置.
The Third Server will be my storage server, this will be where downloadable files are stored.
我的第一个问题是:
- 在我的前端服务器上,我有 8 个内核,扩展节点以便负载分布在各个内核上的最佳方法是什么?
我的第二个问题是:
- 是否有一个系统可以放入我的应用程序框架中,让我可以与其他内核通信并传递消息以节省 I/O.
最后一个问题:
- 是否有任何系统可以帮助我将内容从我的存储服务器移动到前端服务器上的请求,并且开销尽可能小,这里的速度是一个问题,因为我们将有 500 多个客户端下载和上传高峰时段同时进行.
我终于说服了我的雇主,node.js 非常快,它是最新的编程技术,我们应该为我们的 Intranet 系统投资一个平台,但他要求详细的文档说明如何在整个我们可用的当前硬件.
I have finally convinced my employer that node.js is extremely fast and its the latest in programming technology, and we should invest in a platform for our Intranet system, but he has requested detailed documentation on how this could be scaled across the current hardware we have available.
推荐答案
在我的前端服务器上,我有 8 个核心,扩展的最佳方式是什么节点,以便分配负载跨核心?
On my front end server, I have 8 cores, what's the best way to scale node so that the load is distributed across the cores?
尝试查看 node.js cluster 模块,它是一个多核服务器管理器.
Try to look at node.js cluster module which is a multi-core server manager.
这篇关于跨多个核心/服务器扩展 Node.JS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!