简体   繁体   English

在一个VPS上采用“基于名称”的多个网站托管会更慢吗?

[英]Is it slower to employ “name-based” hosting of multiple websites on one VPS?

Assuming traffic/server load is not a factor ... 假设流量/服务器负载不是一个因素...

(Taken further, we could even assume that there are zero visitors, and I just happen to visit one of my websites in a "vacuum") (更进一步,我们甚至可以假设访问者为零,而我恰好以“真空”访问了我的一个网站)

... Would there theoretically be any difference in the loading time if I were to host only a single site on my VPS vs. hosting multiple sites using the "name-based" method? ...如果我仅在VPS上托管单个站点与使用“基于名称”方法托管多个站点,理论上加载时间是否会有差异?

(Even if it is minuscule, I would still like to know—and why, ideally!) (即使它很小,我仍然想知道-为什么,理想情况下!)

So there are a tons of different ways to look at this, most importantly is what type of applications are running. 因此,有无数种不同的方法来查看此问题,最重要的是正在运行哪种类型的应用程序。

What I mean by this is if your running a static webpage for each and using simple domain based routing (nginx or apache) you will see no difference , other than added disk space. 我的意思是,如果您为每个网站运行一个静态网页并使用基于域的简单路由(nginx或apache),除了增加磁盘空间外,您将看不到任何区别

On the other hand you could be running more advanced web applications, for most cases (provided traffic is not a factor) when a request is made to the web server processes it and returns the response, only using possessing time during the request. 另一方面,您可能正在运行更高级的Web应用程序,在大多数情况下(提供的流量不是一个因素),当对Web服务器发出的请求处理该请求并返回响应时,仅使用请求期间的占用时间即可。 This also will see no difference. 这也不会有任何区别。

But! 但! When the application requires added programs and background processing you will see a performance difference minuscule but as you add more "domains" you will see greater performance hit. 当应用程序需要添加程序和后台处理时, 您会发现性能差异很小,但是当您添加更多“域”时,您会看到性能受到更大的影响。

Static Pages: No difference (besides disk space) 静态页面:无差异(磁盘空间除外)
Web Applications : Difference based on non-request based processing Web应用程序 :基于非请求处理的差异

You are asking what is at the root of shared hosting. 您在问什么是共享托管的根源。 Which is amazing for static and basic programs but not so good when you scale it up to larger applications. 对于静态程序和基本程序而言,这是惊人的,但是当您将其扩展到更大的应用程序时,效果不是很好。

Sidenote: This is assuming the applications are not of different run-times and requirements thus having a python + mySql and a node.js + MongoDB at the same time on a weak server would see a performance hit as the services are always running 旁注:这是假设应用程序的运行时和要求不同,因此在弱服务器上同时使用python + mySql和node.js + MongoDB会导致性能下降,因为服务始终在运行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM