当前位置:网站首页>How to do a good job in high concurrency system design? I have summarized three points
How to do a good job in high concurrency system design? I have summarized three points
2022-06-30 15:11:00 【The way to improve the structure】
1、 The code level
Lock the optimization ( Adopt lockless data structure ), Mainly concurrent Below the package is about AQS Some contents of the lock Database cache design ( Reduce the pressure of database concurrent contention ), There will be another cache 、DB Data inconsistency , In practical use , High concurrency systems and data consistency systems adopt the opposite strategy . Merge update is adopted for data update , You can update and merge in the application layer , The same Container There will only be one at a time DB Update request . Others are based on BloomFilter Space for time 、 Reduce processing time through asynchronization 、 Concurrent execution through multithreading and so on .
2、 Database level
Different storage models are selected according to different storage demands , From the early RDBMS, Until then NoSql(KV Storage 、 Document database 、 Full text indexing engine, etc ), To the latest NewSql(TiDB、Google spanner/F1 DB) wait . Table data structure design , Field type selection and difference . Index design , We need to pay attention to the principle of cluster index and the elimination of overlay index sorting , As for the leftmost matching principle, it is common sense of rotten Street , Advanced indexing eliminates some sorting mechanisms, and so on ,B+ Trees and B The difference between trees . The last conventional means : Sub database and sub table 、 Read / write separation 、 Data fragmentation 、 Hot data splitting and so on , High concurrency tends to divide data into buckets , There's a lot more in it , For example, how to initialize a bucket 、 Routing rules 、 How to merge the data in the final stage , The classic way is to divide the bucket into a main bucket +N A bucket .
3、 Architecture design level
The distributed system is service-oriented Stateless supports horizontal elastic expansion and contraction Business logic level failfast Fast failure Call link hotspot data Multi level cache design Advance capacity planning, etc
summary

welfare : Pay attention to the official account reply key : restructure , Free access to 《 restructure : Improve the design of existing code 》
·················· END ··················
Official account , Free learning materials
Ten years of R & D , Big factory architect ,CSDN Blogger
Focus on architecture technology learning and sharing , Career and cognitive upgrading
Insist on sharing the dry goods of the earth , Looking forward to growing with you

「 The road to the advanced architecture 」 Focus on Architecture Research , Technology sharing
I'm looking at one less bug
This article is from WeChat official account. - The road to the advanced architecture (jiagou_jingjin).
If there is any infringement , Please contact the [email protected] Delete .
Participation of this paper “OSC Source creation plan ”, You are welcome to join us , share .
边栏推荐
- 1149 dangerous goods packaging (25 points)
- Win10 backup backup shows that creating a shared protection point on the shadow failed
- 1137: encrypted medical record
- Matlab to find prime pairs within 100
- Programming exercises: whole point and circle (solution ideas and code implementation)
- Finding the root of an integer by dichotomy
- CCF image rotation (Full Score code + problem solving idea) 201503-01
- G - building a space station
- 1027 colors in Mars (20 points)
- 1105 spiral matrix (25 points)
猜你喜欢

Super comprehensive redis distributed high availability solution: sentry mechanism

CCF drawing (full mark code + problem solving ideas + skill summary) February 2, 2014

CCF window (Full Score code + problem solving idea) March 2, 2014

Web technology sharing | whiteboard toolbar encapsulation of Web

Advanced functions of ES6 operation array map (), filter (), reduce()

day02
![[matlab] 2D drawing summary](/img/de/6bb5385f440a2997dbf9cbb9a756eb.jpg)
[matlab] 2D drawing summary

Zero basic C language learning notes -- first introduction -- 2 data types & variables and constants

Matlab judge palindrome number (only numbers)

The principle of fluent 2 rendering and how to realize video rendering
随机推荐
Minimum covering substring of two pointers
Matlab draws the image of the larger function value of the two functions (super simple)
Programming exercises: special numbers (problem solving ideas + code implementation)
CCF drawing (full mark code + problem solving ideas + skill summary) February 2, 2014
[matlab] 3D drawing summary
CCF elimination games (Full Score code + problem solving ideas + skill summary) February 2, 2015
The principle of fluent 2 rendering and how to realize video rendering
O - ACM contest and blackout (minimum spanning tree, Kruskal)
浅析卧式加工中心上不规则台阶孔存在问题
1149 dangerous goods packaging (25 points)
Four solutions to cross domain problems
1027 colors in Mars (20 points)
Matlab judge palindrome number (only numbers)
国债逆回购在哪个平台上买比较安全?
Determine the number of digits of an integer in MATLAB (one line of code)
Soap comparison result file description
Super comprehensive redis distributed high availability solution: sentry mechanism
Programming of left-hand trapezoidal thread
Scattered knowledge of C language (unfinished)
Greedy interval problem (5)