English 中文(简体)
在一个网络服务器上,它何时值得做不错的I/O?
原标题:On a web server, when is it worth it to do asychronous I/O?

Im在预计在短期内吸引大量用户的网站上工作,我们希望尽量减少农场所需的服务器数量。 处理申请可能涉及当地I/O、Sql服务器向单一db服务器提出请求,以及http://quest to anexternal website。 我的第一项想法是,我们当然需要执行所有I/O asynchronous,但是在

我的理解是,单凭单向一台q车服务器打电话,就可以把瓶子移至 d服务器。 由于我们的散货申请应当迅速进行,因此最好保持同步,以便通过多个网络服务器而不是单一散货机提出申请。

在进入当地档案系统时,我怀疑同样的情况(把瓶颈进一步推向监督厅)。 当地档案I/O是按网络要求大小阅读/撰写一份或两份25K-150K文件的良好理由吗?

查阅外部网站的情况是,不同步的请求可能仍然具有意义。 外部服务不太可能成为瓶颈(比我们的网站需要更可衡量),并且会带来更长时间的拖延(与垃圾和当地档案相比),因为互联网连接遍及因特网。 这也是相对少见的情况,可能占所有申请的5%。

我没有足够的经验来在这些问题上有良好的“感觉”,虽然我们需要做一些业绩测试,但我们没有时间广泛测试所有可能的执行情况。

这可能没有变化,但本案中的软件包是ASP。 Net MVC 3和Sql服务器。

为了了解范围,我们需要在两个星期内为大约1 000万用户做好准备,很可能是先 sp。 该网站涉及重载和归还大约150K的档案,并在b中保存一些简单的记录。 我们再次担任裁谈会主席,但我的关切主要放在档案和编目I/O以及外部网站的电话上。

是否考虑过哪里的 calls声实际上会有助于这一应用?

最佳回答

Async helps if you wait for a long time. E.g. you start a request via http or socket to a service and wait 15 seconds for response. In this case it makes no sense to block a thread for waiting as more threads are required which costs context switches and cost a lot of memory.

in the case of databases async makes sense for writing statistic records, where you have a fire and forget and dont wait for the response. In any other case i would analyze why the db is too slow that you think you require async.

normally i would say, async stuff heavily increases complexity, and in my personal experience it was in many cases not worth the effort. I would optimize everywhere else, using caching etc before going async.

问题回答

暂无回答




相关问题
Server Error in /domain/website Application

I am getting following error while i deployed the website.. Server Error in /domain/website Application. Runtime Error Description: An application error occurred on the server. The current custom ...

Can t get anonymous access to website

I have already asked this question on ServerFault however I got very minimal replies....one to be exact. I need this issue resolved ASAP hence why I am asking on here aswell. I have a server running ...

Webserver failover

I will be running a dynamic web site and if the server ever is to stop responding, I d like to failover to a static website that displays a "We are down for maintenance" page. I have been reading and ...

What does it mean "to write a web service"?

I just asked a question about whether it was possible to write a web-page-checking code and run it from free web server, and one supporter answered and said that it was possible only if I run "a web ...

热门标签