我的 Perl 脚本如何使用 Amazon 云?
我希望我的 Perl 脚本可以处理大量用户。 我将在亚马逊云服务器上运行该脚本。
这是我对云如何运作的理解。 首先,脚本实例在单个服务器上运行。 然后,当服务器因用户过多而过载时,将添加第二个服务器来运行脚本实例。 我对云的理解正确吗?
我需要做一些特别的事情才能使这个过程正常进行吗? 或者也许一切都无缝运行,我唯一要做的就是将脚本上传到图像?
I want my Perl script can handle a large number of users.
I'm going to run the script on Amazon clouds servers.
This is my understanding of how the clouds work.
At first the script instances are run on a single server.
Then at the moment the server gets overloaded by too many users, the second server is added to run script instances.
Do I understand clouds right?
Do I have to do anything special to make this process work?
Or maybe everything is run seamlessly and the only thing I have to do is to upload the script to the image?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于云计算来说,这个定义有点过于狭隘,但对于这个问题的目的来说可能已经足够接近了。这个过程不是无缝的,您必须实际检测到您的运行对于单台机器来说太热并添加另一个实例。您可以使用 API。然而,启动另一个实例确实需要实时的时间,因此最初分配任务更有意义。
如果您的 Perl 脚本已经可以干净地并行运行,那么您不必进行太多更改。只需将其推到多个实例上即可。
That is a bit too narrow of a definition for cloud computing but probably close enough for the purposes of this question. The process isn't seamless, you have to actually detect that you're running too hot for the singe machine and add another instance. You can do this from perl using the API. It does, however, take real time to spin up another instance so it makes more sense to distribute your task initially.
If your perl script is something which can cleanly run in parallel already then you don't have to make many changes. Just shove it onto a number of instances and away you go.