并发用户数:是同时执行一个操作的用户,或者是同时执行脚本的用户,这个并发在设置不同场景的时候并发的情况是不一样的,在实际的测试中需要根据具体的需求进行设计;Number of concurrent users: users who perform an Operation at the same time, or users who execute scripts at the same time. The concurrency of this concurrency is different when setting up different scenarios. In the actual test, it needs to be designed according to specific requirements; concurrency Mainly for the server, the key to concurrency is to see whether user operations have an impact on the server.
Online users may not be concurrent with other users. For example, users who are browsing the web have no effect on the server. However, the number of online users is one of the main basis for counting the number of concurrent users.
In the vernacular of the above theory, the number of concurrency is a noun encountered when we first started building a website, but we don’t have a correct understanding of this. Let’s just use a data to talk about it. Assuming that the daily pageview PV of the website is 100,000, the average is 1 second. It is probably 100000/3600/24=1.15. Of course, this is average. What does it mean? The average PV per second of 100,000 PV per day is 1.15. Less than 2 is almost understandable. The average number of concurrent users is less than 2. Of course, the daily visit is Uneven ones, such as less in the morning, noon and afternoon, and the peak in the evening. Then we can look at the logs of nginx / PHP, etc. We can see that the maximum active process upper limit can almost infer how much the maximum concurrent number can reach. Based on experience, it is almost 5-10 The average left and right are below 5. If the average number of visits per capita of the website is 10, then 100,000 PV is about 10,000 IP. A personal website per capita of 10 should be relatively good. So if the per capita reaches less than 10, for example, 6 100,000 pv is about There are 16666 IPs. Of course, if the per capita is 20 or more, there are probably 5000 IPs, so a concurrent number of about 5 can bear 10,000 to 10,000 IPs. It can be seen that the number of concurrents is not as weak as we thought. If one concurrency reaches 30/50 /100 /800 /1000 What is the concept of concurrency that runs to conservative 30?
Theoretically support 2.59 million (60*60*24*30) PV per day. What is the concept of concurrency with about 120,000-35 million IPs running to a conservative 50?
In theory, it supports 4.32 million (60*60*24*50) PV per day. About 22-700,000 IP ran to a conservative 100 concurrency What is the concept?
Theoretically support 8.64 million (60*60*24*100) PV per day. About 43-1.44 million IP ran to a conservative 800 concurrent (cpu occupies less than 70%), what is the concept?
Theoretically support 69120000 (60*60*24*800) PV per day. About 3.5-11.5 million IPs ran to a conservative 1000 concurrency (CPU occupies less than 80%), what is the concept?
Theoretically support 86.4 million (60*60*24*1000) PV per day. Approximately 435-14 million IPs. Looking at this data, we have an intuitive understanding of concurrency, so there is no need to adjust the number of concurrency to a high level. This takes up host resources. A general personal website of 30 ~ 50 is completely enough unless you If you can reach this level with millions and tens of millions of traffic, you won't be a noob. Just laugh.

并发主要是针对服务器而言,是否并发的关键是看用户操作是否对服务器产生了影响。

在线用户不一定会和其他用户发生并发,例如正在浏览网页的用户,对服务器是没有任何影响的。但是,用户在线数量是统计并发用户数量的主要依据之一。

以上 理论 以下白话

,,, 并发数 是刚开始建站时候遇到的名词  但是我们对此 并没有一个正确的认识

直接拿一个数据来说话吧

假设 网站每天的浏览量 PV 是10万

那么平均到1秒   大概是  100000/3600/24=1.15

当然这是平均  什么意思呢 就是1天10万的PV 平均到每秒的PV 是1.15 不到2

差不多可以理解 平均的并发用户数 还不到2

当然每天访问 是不均匀的 比如早上上午少   中午下午开始增加 晚上到达顶峰

那么我们可以看nginx / php 等 的日志 可以看到最大的活跃进程上限 差不多可以推测出 最大的并发数可以达到多少

根据经验  差不多在5-10左右 平均都在5以下

 

如果说 网站的人均访问次数 是10  那么 10万PV 大概是1万IP  

一个个人网站 人均达到10 应该是比较不错了  所以说 如果人均达不到10 比如6  10万pv大概就有 16666的IP了

当然如果人均20以上  大概也有5000IP

所以说  一个并发数5左右 就可以承担1-2万IP了  可见

并发数 并没有我们想象的那么弱

如果一个并发达到30     / 50  /100 /800  /1000

 

跑到保守30的并发  什么概念呢?

理论上支持每天 259万 (60*60*24*30)的PV。 约12-35万IP

跑到保守50的并发  什么概念呢?

理论上支持每天432万 (60*60*24*50)的PV。 约22-70万IP

跑到保守100的并发  什么概念呢?

理论上支持每天 864万 (60*60*24*100)的PV。 约43-144万IP

跑到保守800的并发(CPU占用不到70%),什么概念呢?

理论上支持每天69120000(60*60*24*800)的PV。约350-1150万IP

跑到保守1000的并发(CPU占用不到80%),什么概念呢?

理论上支持每天 8640万 (60*60*24*1000)的PV。约435-1440万IP

 

看这个数据 我们对并发就有一个直观上的认识了

所以并不需要把并发数调的很高  这样占主机资源  一般的个人网站调个30  ~ 50 就完全足够了

除非你有上百万上千万的流量

如果能做到这个级别 你也不是小白了  见笑

 

下面再转载一篇 知乎上的文章 1000个并发到底最大能承载多少用户?见第二页

    内容分页 1 2
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。