如何确定云托管的 RAM 要求?

发布于 2024-10-21 02:03:37 字数 317 浏览 1 评论 0原文

我对“云”的一切都很陌生。

我将开发一个网站/平台,预计在第一年后每月将有大约 15,000,000 名访问者。

我假设该网站的每个访问者有 5 次页面浏览量,每页有 100kb 的数据传输量。

我联系了几家云托管公司,但他们告诉我,我需要有“硬件要求”。

由于我对 IT 知识一无所知,我想知道:

需要分析哪些因素才能确定

  • 需要多少服务器
  • VPU / 服务器所需
  • RAM / 所需服务器
  • 总存储 / 所需服务器

非常感谢提前!

I'm new to everything that is 'the cloud.'

I will be developing a website/platform that will have around 15,000,000 estimated monthly visitors after the first year of production.

I'm assuming that the site will have 5 page views per visitor, and 100kb of data transfer per page.

I've contacted several cloud hosting companies, but they tell me that I need to have 'hardware requirements.'

Since I'm rather clueless about IT stuff, I'd like to know:

What are the factors that need to be analyzed in order to determine

  • How many servers are required
  • VPUs / server required
  • RAM / server required
  • Total storage / server required

Big thanks in advance!

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

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

发布评论

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

评论(2

呆萌少年 2024-10-28 02:03:37

我不同意另一个答案,因为这几乎完全是猜测,就像你自己生成的任何东西一样。

唯一可靠的方法是获取一些硬件,将您的应用程序放在上面并运行一些负载测试,看看您是否可以达到您想要的流量程度,并且在服务器上有一定量的免费开销。只有这样你才会知道自己需要什么。没有其他人可以回答这个问题,因为每个应用程序都是不同的。这是您的应用程序,只有您可以测试它。

I don't agree with the other answer as it's nearly total guesswork, as will anything you can generate yourself.

The only surefire way to know is to get some hardware, stick your application on it and run some load testing to see if you can get to the point you want to traffic wise, and with a certain amount of free overhead on the servers. Only then will you know what you need. No-one else can answer this question as every application is different. This is your application, only you can test it.

不顾 2024-10-28 02:03:37

给出的数据对于确定您想要的数字没有多大帮助。但根据我的经验,我会尽力帮助你分析。

每月 15,000,000 次访问意味着每天 70 万次访问(假设大约 30-35% 的访问来自重复访问者)。

700Kx5=每天350万页面浏览量。
假设活跃期为 14 小时,这是单个 timezeone 站点的典型情况。其速度为 70 请求/秒。

有了如此庞大的用户群,您肯定需要一台带有一个从服务器的高性能数据库服务器。
这些数据库服务器的配置

  1. 内存,以便整个活动数据+索引适合内存(不应该发生交换/颠簸)。你需要根据这个来计算
    您将为用户存储什么以及存储多长时间。
  2. 使用一些可靠的存储,例如 RAID10(更高的读/写带宽)。
  3. 带上足够的存储空间,看看它是否足够有弹性。 (如 AWS EBS)。

使前端应用程序服务器轻量级且可水平扩展。将它们放在负载均衡器后面(使用软件负载均衡器,如 nginx 或 HAproxy)。您应该能够为实现目标投入尽可能多的资金。

对于负载均衡器和前端,需要 4CPU、4-8GB RAM 服务器
每个前端可以承受多少需要使用负载测试方法和实际测试数据进行测试。

使用内存/+持久缓存(如 memcached/membase/redis 等)减少数据库/持久负载。采用 8GB 的​​服务器,并根据需要添加更多。

我还没有讨论过数据库分区。仅当您觉得需要时才这样做。一开始不要过度投资。

每月有 1500 万用户,这个设置应该足够了,但这一切都取决于你:1. 内存占用,2. 活动数据量

我试图尽可能多地回答。对您不同意或想进一步讨论的观点发表评论。

Data given wont help much in determining what numbers you want. But based on my experience I'll try to help you in analysis.

15,000,000 visits a month means 700K visits a day (assuming approx 30-35% visits are by repeat visitors).

700Kx5=3.5million page views a day.
Assuming 14 hours of active period, typical for single timezeone sites. Its 70reqs/sec.

With this big userbase few thing you surely need is a high performance DB server, with one slave.
Config of these DB server

  1. Memory so that whole active data + indexes fits in memory (No swapping/thrashing should happen). This you need to calculate based on
    what you will be storing for user and for how long.
  2. Use some reliable storage like RAID10 (higher read/write bandwith).
  3. Take enough storage, see that its elastic enough. (like AWS EBS).

Make frontend app server lightweight and horizontally scalable. Put them behind a loadbalancer (use software loadbalancer like nginx or HAproxy). You should be able to put as many as you go to your goal.

For loadbalacer and frontend take 4CPU, 4-8GB RAM servers.
How much each frontend can take need to be tested using a load testing method and realistic test data.

Reduce load on database/persistent using a inmemory/+persistent caches like memcached/membase/redis etc. Take a servers with 8GB and add more as you feel need.

I have not discussed about DB partitioning. Do that only when you feel the need of it. Do not over invest at start.

With 15M users a month, this setup should be enough, but again it all depends on you 1. memory footprint, 2. amount of active data

I tried to answer as much as possible. Comments on points you disagree or wanna discuss more.

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