当前位置:网站首页>Great vernacular with high concurrency (I)
Great vernacular with high concurrency (I)
2022-06-27 00:55:00 【Your brother Dachen】
background
Although everyday curd boy, But also a little pursuit , We make our own scenes without scenes , Then I'll order one 200 Million concurrent seckill scenes .
Common terms
1 Concurrency
Just how many people came , such as 618,xxx A product in the live broadcasting room has 100 Ten thousand people kill every second , The concurrency is 100 ten thousand , But it doesn't mean you're here 100 I can deal with it all at the same time , We can 10 ten thousand 10 Wan's handling .
2 throughput
Throughput is the number of customer requests processed by the system per unit time . To put it bluntly 1 How much can be handled in seconds .
In the case of low concurrency , Throughput is proportional to concurrency , At this time, the background processing capacity is sufficient . When the concurrency reaches a certain number , Insufficient server processing capacity ( Thread switching ), Throughput is reduced .
For example, at the beginning, concurrency is 10 individual , The response time for each request is 0.01, The throughput is 1000, Later, the concurrency was increased to 100 The response time of the request is still 0.01 The throughput is 10000, Later, concurrency was added to 10000 Each request response time becomes 1.1 second , The throughput becomes 9000 about .
TPS、QPS
if kg Is the standard of weight , that TPS Namely QPS Measurement of , You said that the server throughput is large , How to call it big ,100qps/s Than 50qps/s Big , Only when there is reason and evidence can .
TPS:Transactions Per Second( Transactions per second ), The number of transactions processed by the server per second . Generally used to evaluate databases 、 Benchmark performance of the trading system .
QPS:Queries Per Second( Query quantity / second ), Is the number of queries that the server can process per second , For example, domain name server 、 Interface 、Mysql Query performance .
that tps and qps What's the difference ?
Here is a quote from someone else :
Share your understanding :TPS That is to say transactions per second, It reflects doing a thing ,1s How many times can you do it . It is more concerned with how many times a thing can be done . for instance , We transfer ,A The user to B User transfer ,1s How many such operations can be supported . Take transfer as an example : The payment system has 1 Interface , Support A towards B Transfer accounts ; The accounting system has 1 Interface , How much money can be reduced to support a certain user . Our normal transfer process , Payment system call 2 Secondary accounting system ,A Users reduce money 1 Time ,B Users add money 1 Time . Business people do not understand these technical terms , Put forward the demand and say it is necessary 0 Point support 10W Transfer operation , So how do technicians generally describe , That's it :
The transfer interface of the payment system supports TPS 10W.
The transfer interface of the accounting system supports TPS 20W.
QPS That is to say queries per second, The literal meaning reflects how many times a second it can be checked . Because of this query Look up this word , Whatever you look at wiki still Baidu Encyclopedia , They are all about query operations ,1s How many times can it support . I think the main reason to mention these terms is to know what he wants to express . Like your boss told you , Our transfer business should support 10W Of TPS, You should distinguish the whole business 10W TPS, Or the number of interfaces to our system is 10W TPS, Because the amount of business support and the interface called to our system are not necessarily 1:1. For example, your colleagues tell you , Our query interface supports 100W TPS. Although by definition , use QPS It is more appropriate to express , But you know what he wants to say is that this interface supports so many QPS That's all right. . Someone bragged to you , How much does the system support QPS. You can keep an eye on , Generally speaking, the query operation is simpler than the non query operation , Even after adding the cache, you may not hit DB, So it doesn't matter . But if you say TPS Words , Generally speaking , The technical content will be relatively high .
边栏推荐
- 墨者学院-SQL注入漏洞测试(报错盲注)
- Redis detailed tutorial
- Is it safe for CITIC Securities Commission to open an online account and speculate in stocks
- Freescale 单片机概述
- 【Vscode】预览md文件
- Solve the problem that stc8g1k08 program cannot run and port configuration
- Is it safe to open a compass account?
- CEC-I 中华学习机使用说明与问答
- In depth understanding of UDP in the transport layer and the use of UDP in sockets
- Review the old and know the new -- constant renewal at normal temperature
猜你喜欢
随机推荐
com.fasterxml.jackson.databind.exc.MismatchedInputException: Expected array or string. at [Source:x
自定义MVC(导成jar包)+与三层架构的区别+反射+面试题
CEC-I 中华学习机使用说明与问答
Law of Large Numbers
[vscade] preview MD file
How to easily describe the process of machine learning?
CH423要如何使用,便宜的国产IO扩展芯片
从位图到布隆过滤器,C#实现
05 | standard design (Part 2): how to standardize the different styles of commit information, which are difficult to read?
基于SSMP的宠物医院管理系统
Generate flow chart with code, and how to use markdown
These 10 copywriting artifacts help you speed up the code. Are you still worried that you can't write a copywriting for US media?
Technical dry goods | what is a big model? Oversized model? Foundation Model?
如何写好测试用例以及go单元测试工具testify简单介绍
No clue about complex data?
Flink 实战问题(七):No Watermark(Watermarks are only available EventTime is used)
About Random Numbers
玩转OLED,U8g2动画,增长数字和随机三角形等
Gaussian and Summary Stats
ArcGIS 镶嵌数据集切片丢失问题处理