-1

I have a very simple MVC4 post action as part of Azure webrole:

[HttpPost]
    public ActionResult Index(Request request)
    {
        return new JsonResult() 
        { 
            Data = "OK", 
            JsonRequestBehavior = JsonRequestBehavior.AllowGet 
        };
    }
  1. I deployed the webrole to Azure.
  2. I used benchmark (ab.exe) and see that 25 concurrent requests are processed no longer then 1 sec for instance.
  3. Now I want to scale out by adding a new webrole instance so I'm expecting +25 concurrent users will be also happy with 1 sec delay.
  4. I ran becnhmark one more time and the result was the same as for 1 webrole instance.

P.S I have Free Azure Subscription. Webroles have Small VM size.

Why when I am adding new webrole instances webservice capacity is not increased? Have I missed some configuration or what?

4

1 回答 1

3

对于 25 个并发用户,您预计会发生什么变化?

扩展更多实例的想法是处理更多并发用户,而不是更快地处理少量用户......

我建议你测试边缘情况——比如1000并发用户,用单个实例找到饱和点。假设单个实例可以安全地处理546并发用户。100现在增加实例数,用并发用户预热测试。增加1000并发用户。您的服务现在是否可以1000很好地处理并发用户,而不仅仅是546......这是添加更多实例的想法......

所有虚数。

更新

有趣的是,你说你使用:

ab -n 25 -c 25 -p json.file -T "application/json; charset=utf-8" xxxxx.cloudapp.net

现在从文档中:

-c concurrency 一次执行的多个请求数。默认是一次一个请求。

-n requests 为基准测试会话执行的请求数。默认情况下只执行一个请求,这通常会导致不具代表性的基准测试结果。

当您只执行 25 个并发请求时,您期望得到什么结果?我建议您使用以下参数:

ab -n 150 -c 1000 -p json.file -T "application/json; charset=utf-8" xxxxx.cloudapp.net

并再次检查结果!

于 2013-05-24T19:59:56.697 回答