Windows Azure 平台如何针对我的应用程序进行扩展?

发布于 2024-09-02 07:30:35 字数 527 浏览 11 评论 0原文

只是一个关于 Azure 的问题。

是的,我大致了解Azure和云计算。我会这样说:比如说

,按照正常方式,我构建一个监听 TCP 端口的程序。我在服务器中运行这个服务器程序。我还构建了一个客户端程序,它通过指定端口连接到服务器。一旦客户端连接上,我的服务器程序将计算一些东西并返回给客户端。

上面是正常的模型,或者说我的程序的模型。

现在我想使用Azure。我想用是因为我的客户太多了,比如说一天100万。我不想租用1000台服务器并维护它们。 (只是对客户数量的假设)

我已经查看了 Azure 定价计划。它谈到了 CPU,并谈到了小型、中型、大型实例。

我不知道他们的意思。例如,在我上面假设的情况下,我需要多少个实例?或者最多我可以从 azure 获得超大(8 个小实例?)

Azure 如何针对我的程序进行扩展?如果我选择小型实例(我的服务器程序很小,只是计算一些数据并返回给客户端),Azure会为我扩展吗?或者Azure只给我一台虚拟服务器并让它超载?

请仅考虑 CPU,而不考虑存储或网络流量。

Just a question about Azure.

Yes, I know roughly about Azure and cloud computing. I will put it in this way:

say, in normal way, I build a program listening to a TCP port. I run this server program in a server. I also build a client program, which connects to the server through specified port. Once a client is connected, my server program will compute some thing and return to the client.

Above is the normal model, or say my program's model.

Now I want to use Azure. I want to use because my clients are too many, let's say 1 million a day. I don't want to rent 1000 servers and maintain them. ( just a assumption for the number of clients)

I have looked at the Azure pricing plan. It say about CPU and talks about small, median, large instances.

I don't know what they mean. for e.g., in my above assumed case, how many instances do I need? or at most I can get from azure for extra large (8 small instances?)

How does Azure scale for my program? If I choose small instance (my server program is very little, just compute some data and return to clients), will Azure scale for me? or Azure just gives me one virture server and let it overload?

Please consider the CPU only, not storage or network traffic.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

度的依靠╰つ 2024-09-09 07:30:35

您可以选择两件事:运行什么大小的虚拟机(小型、中型、大型)以及运行多少个虚拟机。这意味着您可以选择一个小型虚拟机(单处理器)并运行它的 100 个“实例”(100 个虚拟机),或者您可以选择一个大型虚拟机(同一服务器上的 8 个处理器)并运行它的 10 个实例(10 个虚拟机) 。

如今,Windows Azure 不会自动调整您的规模,因此您可以根据需求的增加,使用 Web 门户或服务管理 API 来增加实例数量。

You choose two things: what size of VM to run (small, medium, large) and how many of those VMs to run. That means you could choose a small VM (single processor) and run 100 "instances" of it (100 VMs), or you could choose a large VM (eight processors on the same server) and run 10 instances of it (10 VMs).

Today, Windows Azure doesn't automatically adjust your scale, so it's up to you to use the web portal or the Service Management API to increase the number of instances as your need increases.

自控 2024-09-09 07:30:35

需要考虑的因素之一是您的应用程序是否可以利用多核环境(多线程、共享内存等)来提高其规模。如果可以的话,使用 5 个 2x 核心(即中型)VM 可能比 10 个 1x 核心(小型)VM 更好。在某些情况下,您可能会发现 2 个 4 核虚拟机的性能优于 5 个 2 核虚拟机。

如果您的应用程序不是并行/多核,那么您可以只使用一些“x”个小型虚拟机。无论如何,费用都是线性的 - 即 2 核虚拟机的成本是单核成本的两倍。

其他因素包括暂存盘大小和暂存盘大小。 VM 中的可用内存。

另一项建议 - 您可能想考虑利用 Azure 队列(即让客户端发布到队列,工作人员从那里拉取)。这将允许您透明地(对客户端)增加/减少工作人员,而无需担心连接等。此外,如果处理步骤失败并使您的实例崩溃,消息将持续存在并被其他消息之一拾取。

One factor to consider is if your app can take advantage of multi-core environments - multi-thread, shared memory, etc. to improve its scale. If it can, it may be better to use 5 2x core (i.e. medium) VMs than 10 1x core (small) VMs. You may find in some cases that 2 4x core VMs perform better than 5 2core.

If your app is not parallel/multi-core, then you could just do some 'x' number of small VMs. The charges are linear anyway - i.e. a 2core VM is twice the cost of a single core.

Other factors would include the scratch disk size & memory available in the VM.

One other suggestion - you may want to look into leveraging the Azure queues (i.e. have the client post to the queue and the workers pull from there). This would allow you to transparently (to the client) increase/decrease the workers w/out worrying about connections, etc. Also, if a processing step failed and crashed your instance the message would persist and be picked up by one of the others.

dawn曙光 2024-09-09 07:30:35

我建议你还监视、评估和完善 Azure 配置的结果。

对于“监视 Windows Azure 中的应用程序”(和性能),请参考
http:// /channel9.msdn.com/learn/courses/Azure/Deployment/DeployingApplicationsinWindowsAzure/Exercise-3-Monitoring-Applications-in-Windows-Azure/

还有一篇不错的博客文章,标题为“可视化 Windows Azure 诊断数据”

I suggest you also monitor, evaluate, and perfect the results of your Azure configuration.

For "Monitoring Applications in Windows Azure" (and performance) please reference
http://channel9.msdn.com/learn/courses/Azure/Deployment/DeployingApplicationsinWindowsAzure/Exercise-3-Monitoring-Applications-in-Windows-Azure/

There is also a good blog entry titled "Visualizing Windows Azure diagnostic data"

︶ ̄淡然 2024-09-09 07:30:35

查看 http://www.paraleap.com - 用于根据情况自动调整实例数量的简单服务要求。

Check out http://www.paraleap.com - simple service for automatically adjusting number of instances that you have according to demand.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文