Article directory
Note: Part of the reference is "Back-end Architect Technical Map"
Architecture related
storage
SQL
-
mysql
-
theory
- "Three Paradigms and Five Constraints of Databases"
- First normal form: each column (each field) in the data table must be the smallest unit that cannot be split, that is, to ensure the atomicity of each column;
- Second Normal Form (2NF): After satisfying 1NF, all the columns in the table must depend on the primary key, and there cannot be any column that has nothing to do with the primary key, that is to say, a table only describes one thing;
- Third normal form: must first meet the second normal form (2NF), requirements: each column in the table is only directly related to the primary key rather than indirectly related, (each column in the table can only depend on the primary key);
- "Three Paradigms and Five Constraints of Databases"
-
principle
-
"Detailed Explanation of MySQL's InnoDB Indexing Principles"
-
"MySQL storage engine - the difference between MyISAM and InnoDB"
- The main difference between the two types is that Innodb supports transaction processing, foreign keys and row-level locks
-
"The difference between myisam and innodb index implementation"
-
-
InnoDB
-
optimization
-
"The Best 20+ Experiences of MYSQL Performance Optimization"
-
"MySQL Single Table Millions of Data Records Paging Performance Optimization"
-
"Database sub-database sub-table"
- "Common distributed primary key ID generation strategy for database sub-database and sub-table"
- "Database Sharding Series (1) Sharding Implementation Strategy and Example Demonstration"
- "Database Sharding Series (2) Global Primary Key Generation Strategy"
- "Database sub-database sub-table (sharding) series (3) Considerations on whether to use the framework or self-developed and sharding implementation level"
- "Database Sharding Series (4) Transaction Processing of Multiple Data Sources"
- "Database Sharding Series (5) A Sharding Expansion Solution that Supports Free Planning Without Data Migration and Routing Code Modification"
- "Basic Ideas and Segmentation Strategies of Database Sharding"
-
"MYSQL paging limit speed is too slow optimization method"
- In principle, it is to reduce the scanning range.
-
index
-
clustered index, nonclustered index
-
MyISAM is non-clustered, InnoDB is clustered
-
composite index
-
There is an error in the text:
-
For composite indexes, when querying, it is best to order the conditions in the order of searching for the index, which is the most efficient; select * from table1 where col1=A AND col2=B AND col3=D If you use where col2=B AND col1=A or where col2=B will not use the index
- It is mentioned in the original text that the index is created in the order of "col1, col2, col3", while mysql follows the index matching principle of the leftmost prefix, and will automatically optimize the order of where conditions, when only col2=B AND col1= in the conditions When A, it will be automatically converted to col1=A AND col2=B, so the index will still be used.
-
"The Influence of the Order of MySQL Query Where Conditions on Query Efficiency"
-
-
Adaptive Hash Index (AHI)
-
explain
-
series of articles
- "Mysql Use Series"
- "MySQL storage engine comparison"
- read-write split mode
- "Implementation of Mysql master-slave scheme"
- "Building MySQL master-slave replication classic architecture"
- "Haproxy+ multiple MySQL slave servers (Slave) to achieve load balancing"
- "DRBD+Heartbeat+Mysql High Availability Read-Write Separation Architecture"
- DRDB does disk replication to avoid single point of problems.
- "MySQL Cluster Method"
- Fragmentation mode
- "Problems and solutions to be considered in sub-database and sub-table"
- Middleware: Lightweight: sharding-jdbc, TSharding; Heavyweight: Atlas, MyCAT, Vitess, etc.
- Problems: transaction, join, migration, expansion, ID, paging, etc.
- Transaction compensation: reconciliation check of data; comparison based on logs; regular synchronization with standard data sources, etc.
- Sub-database strategy: numerical range; modulo; date, etc.
- Number of sub-databases: Usually, 50 million records in a single MySQL database and 100 million records in a single Oracle database need to be divided into databases.
- "Detailed Explanation of MySql Sub-Table and Table Partition"
- Partition: It is an internal mechanism of MySQL, which is transparent to the client. Data is stored in different files, which appear to be the same table on the surface.
- Sub-table: Create different tables physically, and the client needs to manage sub-table routing.
- "Problems and solutions to be considered in sub-database and sub-table"
-
-
tidb
NoSQL
- redis
- Detailed data structure
- Interpretation of redis commands
- "Redis Usage Interpretation"
- "Why use Redis and its product positioning"
- "Redis Persistence Mechanism AOF/RDB Detailed Explanation"
- "Redis source code analysis - detailed explanation of rehash process"
- "Detailed Redis and Memcached"
- "Interrupt Optimization under Redis High Load"
- "Redis memory usage optimization and storage"
- "Meituan's Exploration and Practice of Redis Rehash Mechanism"
- "Governance and Practice of Large-Scale Codis Clusters"
- "Redis Common Cluster Scheme, Codis Practice and Comparison with Twemproxy"
- "Redis Sentinel Master-Slave High Availability Solution"
- "In-depth analysis of redis data elimination strategy"
- "Governance and Practice of Large-Scale Codis Clusters"
- leveldb
- rocksdb
- memcache
- pika
FS
- hdfs
- seaweedfs
- ceph
search
- ES
distributed correlation
-
Zookeeper
-
Etcd
-
distributed architecture
-
"Building a Billion-Level Web System——Single Machine to Distributed Cluster"
-
"Large-scale concurrency of Web system - e-commerce spike and snap-up"
-
Caching Mechanisms and Geometric Fractals for Large-Scale Website Architecture
-
"Finally someone explained the implementation principle of "TCC distributed transaction" clearly"
-
"Building a Highly Concurrent and Highly Available E-commerce Platform Architecture Practice"
-
"The Practice of Splitting and Transforming a Complex System"
-
Extensible design
- "Ten Scalable Architectures Architects Must Know"
- To sum up, the general routine is distribution, caching and asynchronous processing.
- "Data Segmentation for Scalable Design"
- Horizontal split + vertical split
- Use middleware for sharding, such as MySQL Proxy.
- Segmentation is performed using a sharding strategy, such as modulo by ID.
- "Talk about how to achieve scalable large-scale website architecture"
- Distributed service + message queue.
- "Large Website Technical Architecture (7) - Website Scalability Architecture"
- "Ten Scalable Architectures Architects Must Know"
-
CAP and BASE theory
- "From Distributed Consistency to CAP Theory and BASE Theory"
- Consistency classification: strong consistency (immediate consistency); weak consistency (consistency can be achieved within a unit of time, such as second level); final consistency (a kind of weak consistency, final consistency within a certain period of time)
- CAP: consistency, availability, partition fault tolerance (caused by network failure)
- BASE: Basically Available (basically available), Soft state (soft state) and Eventually consistent (final consistency)
- The core idea of the BASE theory is: Even if strong consistency cannot be achieved, each application can use an appropriate method according to its own business characteristics to make the system achieve final consistency.
- "From Distributed Consistency to CAP Theory and BASE Theory"
-
distributed lock
- "Several Implementations of Distributed Locks"
- Database-based distributed locks: Advantages: Simple operation and easy understanding. Disadvantages: There is a single point problem, the database performance can be expensive, and it cannot be reentrant;
- Cache-based distributed lock: Advantages: non-blocking, good performance. Disadvantages: Poor operation may easily cause the lock to fail to be released.
- Zookeeper distributed lock: The lock mechanism is implemented through ordered temporary nodes, and the corresponding node needs to be the smallest, and it is considered to have acquired the lock. Advantages: The cluster can transparently solve single-point problems, avoid the problem of locks not being released, and locks can be reentrant. Disadvantages: The performance is not as good as the cache method, and the throughput will decrease as the size of the zk cluster becomes larger.
- "Distributed lock based on Zookeeper"
- Clear schematic description + Java code example.
- "jedisLock—redis distributed lock implementation"
- Based on setnx (set if ont exists), return false if there is, otherwise return true. And support expiration time.
- "Memcached and Redis Distributed Lock Scheme"
- Use the add (different from set) operation of memcached to return false when the key exists.
- "Several Implementations of Distributed Locks"
-
Stability & High Availability
- "Talk about the current limiting stunt of high concurrency system-1"
- "Talk about the current limiting stunt of high concurrency system-2"
- "High Concurrency Service Degradation and Circuit Breaking"
- "System Design: Some Technical Solutions for Highly Available Systems"
- Scalable: horizontal expansion, vertical expansion. Avoid single points of failure through redundant deployment.
- Isolation: avoid a single business from occupying all resources. Avoid mutual influence between services 2. Isolation of computer room avoids single point of failure.
- Decoupling: Reduce maintenance costs and reduce coupling risks. Reduce dependence and reduce mutual influence.
- Current limiting: sliding window counting method, leaky bucket algorithm, token bucket algorithm and other algorithms. When encountering sudden traffic, ensure system stability.
- Degradation: Release resources for non-core functions in emergency situations. Sacrifice non-core business to ensure high availability of core business.
- Fuse: The abnormal situation exceeds the threshold and enters the fuse state, failing quickly. Reduce the impact of unstable external dependencies on core services.
- Automated testing: Reduce failures caused by releases through comprehensive testing.
- Grayscale release: Grayscale release is a compromise between speed and security, which can effectively reduce release failures.
- "About Highly Available Systems"
- Design principles: no data loss (persistence); high service availability (service copy); absolute 100% high availability is difficult, the goal is to achieve as many as possible 9, such as 99.999% (accumulated only 5 minutes throughout the year).
monitor
- Open-Falcon
- Promethues
link tracking
- "Distributed link tracking based on SOFATracer + Zipkin"
- "Distributed link tracking component SOFATracer and Zipkin model conversion"
log
- ElasticSeach
- Logstash
- Kibana
- Filebeat
- log collection
queue
- Kafka
- "In-depth interpretation of kafka data reliability"
- "Detailed Explanation of Kafka Design and Principles"
- "Deep Learning Kafka: Leader Election - Kafka Cluster Leader Election Process Analysis"
- Kafka series of articles
- "Kafka Design Analysis (1) - Introduction to Kafka Background and Architecture"
- "Kafka Design Analysis (2) - Kafka High Availability (Part 1)"
- "Kafka Design Analysis (3) - Kafka High Availability (Part 2)"
- "Kafka Design Analysis (4) - Kafka Consumer Design Analysis"
- "Kafka Design Analysis (5) - Kafka Performance Test Method and Benchmark Report"
- "Kafka Design Analysis (6): Kafka High Performance Key Technology Analysis"
- "Kafka Design Analysis (7): Upstart Kafka Stream of Streaming Computing"
- "Kafka Design Analysis (8): Kafka Transaction Mechanism and Exactly Once Semantic Realization Principle"
- "Kafka Technology Insider & Kafka Authoritative Guide Reading Notes Series"
- RocketMQ
- RabbitMQ
- NSQ
- MQ comparison
- "Kafka vs RocketMQ - The Impact of Multiple Topics on Performance Stability - Transferred from Ali Middleware"
- "Kafka vs RocketMQ - the impact of the number of Topics on the performance of a single machine - transferred from Ali Middleware"
- "Comparison of Kafka, RabbitMQ, and RocketMQ message middleware - message sending performance"
- "Kafka vs RocketMQ - Standalone System Reliability"
middleware
-
Web Server
- Nginx
- "Basic learning of Ngnix - comparison of multi-process and Apache"
- Nginx achieves high concurrency through an asynchronous and non-blocking event processing mechanism. Apache occupies a thread for each request, which consumes a lot of system resources.
- Event-driven is suitable for IO-intensive services (Nginx), and multi-process or thread is suitable for CPU-intensive services (Apache), so Nginx is suitable for reverse proxy, not web server.
- "The comparison and advantages and disadvantages of nginx and Apache"
- Nginx is only suitable for static and reverse proxy, not suitable for handling dynamic requests.
- "Nginx Optimization under Millions of Concurrency"
- "Nginx Chinese Documentation"
- "Basic learning of Ngnix - comparison of multi-process and Apache"
- OpenResty
- Official website
- "On OpenResty"
- It can be developed on Nginx through the Lua module.
- agentzh's Nginx Tutorial
- Tengin
- Apache Httpd
- Nginx
-
- Tomcat
- Architecture Principles
- Tomcat
-
-
-
- "Detailed Explanation of TOMCAT Principles and Request Process"
- "Detailed Explanation of Tomcat Server Principles"
- "Tomcat System Architecture and Design Patterns, Part 1: Working Principles"
- "Four Pictures Take You to Understand Tomcat System Architecture"
- "JBoss vs. Tomcat: Choosing A Java Application Server》
-Tomcat is a lightweight Serverlet container that does not implement all JEE features (such as persistence and transaction processing), but can be replaced by other components, such as Spring.
- Jboss implements all JEE features, the software is open source and free, and the documentation is charged.- Tuning plan
- "Detailed Explanation of TOMCAT Principles and Request Process"
-
-
-
-
- "Tomcat Tuning Plan"
- start NIO mode (or APR); adjust thread pool; disable AJP connector (Nginx+tomcat architecture, no AJP required);- "tomcat http protocol and ajp protocol"
- "Comparison and Analysis of AJP and HTTP"
- The AJP protocol (port 8009) is used to reduce the number of connections (front-end) with the front-end Server (such as Apache, and needs to support the AJP protocol), and improve performance through long connections.
- When the concurrency is high, the AJP protocol is better than the HTTP protocol.
- Jetty
- "Tomcat Tuning Plan"
-
-
-
- "How Jetty Works and Compared to Tomcat"
- "Advantage comparison between jetty and tomcat"
- Architecture comparison: Jetty's architecture is simpler than Tomcat's.
- Performance comparison: There is not much difference in performance between Jetty and Tomcat. Jetty uses NIO by default to handle I/O requests, and Tomcat uses BIO to process I/O requests by default. Tomcat is suitable for handling a few very busy links and static resources. performance is poor.
- Other aspects: Jetty's application is faster, modification is simple, and it supports the new Servlet specification better; Tomcat supports JEE and Servlet more comprehensively.
- "Advantage comparison between jetty and tomcat"
- "How Jetty Works and Compared to Tomcat"
-
Microservice related
-
RPC
- "Realizing RPC Framework from Scratch - RPC Principle and Implementation"
- Core roles: Server: the service provider that exposes the service, Client: the service consumer that calls the remote service, Registry: the registration center for service registration and discovery.
- "Distributed RPC framework performance comparison of dubbo, motan, rpcx, gRPC, thrift performance comparison"
- "RPCX Analysis"
- "Realizing RPC Framework from Scratch - RPC Principle and Implementation"
-
"Internet architecture, why should it be service-oriented?" "
Big data related
- "Super detailed recommendation of big data learning resources (Part 1)"
- "Super detailed recommendation of big data learning resources (Part 2)"
language related
-
Golang
- Principles of memory allocation
- Advice on Writing Maintainable Go Code
- "Go Language Charging Station"
- "golang source code analysis"
- "go language learning"
- "The Implementation Principle of Golang GC"
- "In-depth understanding of Go map: assignment and expansion migration"
- "The Implementation Principle of Golang Coroutine"
- "Golang's Coroutine Scheduling - Hard Core Principle"
- "Golang Concurrency Model: Easy Entry Pipeline Model"
- "Goroutine Concurrency Scheduling Model In-depth Implementation of a Coroutine Pool"
- "In-depth Analysis of Goroutine Concurrent Scheduling Model Hands Up a Coroutine Pool"
- "Go High-quality Project Recommendation"
- "Golang Smooth Restart"
- "What are the disadvantages of sync.Pool? "
- "How is sync.Pool optimized in Go 1.13?"
- "Go Visual Performance Analysis Tool"
- "Talk about the Design Ideas of Go Socket Framework Teleport"
-
PHP
-
Java
Linux system related
- "Linux Series Learning"
- "Linux command series"
- "Linux Tools Quick Tutorial"
- "Linux select() Detailed Explanation"
- "The most comprehensive linux semaphore analysis"
- "Linux file system analysis"
- "Commands to view system resource usage in Linux"
- "In-depth understanding of Linux network technology insider"
network related
-
OSI seven-layer protocol
-
TCP/IP
-
HTTP
-
HTTP2.0
- Detailed Analysis of HTTP 2.0 Principles
- "The basic unit of HTTP2.0 is binary frame"
- Utilize binary frames to take care of the transmission.
- multiplexing.
- HTTPS
- "Popular Understanding of HTTPS Principles"
- "This is easier to understand HTTPS"
- Negotiate an encryption algorithm using asymmetric encryption
- Transfer data using symmetric encryption
- Use a certificate issued by a third-party organization to encrypt the public key for secure transmission of the public key and prevent it from being tampered with by an intermediary.
- "Eight Free SSL Certificates - Add Https Secure Encryption to Your Website for Free"
-
network model
- "Five models of I/o and three working modes of web" that must be understood in web optimization
- Five I/O models: blocking I/O, non-blocking I/O, I/O multiplexing, event (signal) driven I/O, asynchronous I/O, the first four types of I/O are synchronous operations, I/O The first stage of O is different, the second stage is the same, and the last one is an asynchronous operation.
- Three working modes of Web Server: Prefork (multi-process), Worker mode (thread mode), and Event mode.
- "Summary of the difference between select, poll, and epoll"
- select, poll, and epoll are essentially synchronous I/O, because they all need to be responsible for reading and writing after the read and write events are ready, which means that the read and write process is blocked.
- select has a limit on the number of open file descriptors, the default is 1024 (2048 for x64), 1 million concurrency requires 1000 processes, and the switching overhead is high; poll uses a linked list structure and has no limit on the number.
- Select, poll needs to traverse the entire fd collection when it is "awake", and epoll only needs to judge whether the ready list is empty when it is "awake", and saves a lot of CPU time through the callback mechanism; select, poll calls every time The fd collection needs to be copied from user mode to kernel mode once, while epoll only needs to be copied once.
- The performance of poll will gradually decrease as the concurrency increases. Epoll adopts a red-black tree structure, and its performance is stable and will not decrease as the number of connections increases.
- "select, poll, epoll comparison"
- When the number of connections is small and the connections are very active, the performance of select and poll may be better than that of epoll. After all, the notification mechanism of epoll requires many function callbacks.
- "In-depth understanding of Java NIO"
- NIO is a synchronous non-blocking IO model. Synchronization means that the thread continuously polls whether the IO event is ready, and non-blocking means that the thread can do other tasks at the same time while waiting for IO
- "The difference between BIO, NIO and AIO"
- "Two efficient server design models: Reactor and Proactor models"
- "Five models of I/o and three working modes of web" that must be understood in web optimization
-
Epoll
-
Java NIO
-
kqueue
-
connection and short connection
-
frame
- "Netty Principle Analysis"
- Introduction to the Reactor pattern.
- Netty is an implementation of the Reactor pattern.
- Zero-copy (Zero-copy)
- "Understanding of Zero Copy (Zero Copy) of Netty ByteBuf"
- Multiple physically separated buffers are logically merged into one, thus avoiding the copying of data between memories.
- Serialization (binary protocol)
- "Understanding of Zero Copy (Zero Copy) of Netty ByteBuf"
- "Netty Principle Analysis"
-
Hessian
- "Hessian Principle Analysis" Binary-RPC; not just serialization
-
Protobuf
-
- "Java Application Example of Protobuf Protocol" Produced by Goolge, it takes up more space and efficiency than other serialization libraries, such as Hessian; you need to write a .proto file.
- "Protocol Buffers Serialization Protocol and Application"
- Explanation about the protocol; Disadvantages: poor readability;
- "Simple use of protobuf and protostuff"
- The advantage of protostuff is that Java objects can be serialized directly without writing a .proto file.
- "Simple use of protobuf and protostuff"
- "Java Application Example of Protobuf Protocol" Produced by Goolge, it takes up more space and efficiency than other serialization libraries, such as Hessian; you need to write a .proto file.
Data structure algorithm related
-
data structure
-
queue
-
"java queue - detailed analysis of queue"
-
Non-blocking queue: ConcurrentLinkedQueue (unbounded thread safety), using CAS mechanism (compareAndSwapObject atomic operation).
-
Blocking queues: ArrayBlockingQueue (bounded), LinkedBlockingQueue (unbounded), DelayQueue, PriorityBlockingQueue, using lock mechanism; use ReentrantLock lock.
-
"Comparative Analysis of LinkedList, ConcurrentLinkedQueue, and LinkedBlockingQueue"
-
-
-
gather
-
linked list, array
- "Java collection detailed - what is List"
-
Dictionaries, associative arrays
-
the stack
- "Stack (Stack) Design and Implementation of Java Data Structure and Algorithm"
- "Java Stack Class"
- "Detailed implementation analysis of java stack"
- Stack is thread safe.
- An array is used internally to save data, and it is doubled when it is not enough.
-
Tree
- "Binary Tree"
- Each node has at most two leaf nodes.
- "Binary Tree"
-
complete binary tree
- "Complete Binary Tree"
- Leaf nodes can only appear in the bottom layer and the second bottom layer, and the nodes in the bottom layer are all concentrated in the binary tree at the leftmost position of the layer.
-
-
The absolute value of the height difference between the left and right subtrees does not exceed 1, and the left and right subtrees are both a balanced binary tree.
-
"On Algorithms and Data Structures: 2-3 Trees of Eight Balanced Search Trees"
-
-
- Binary Search Tree (Binary Search Tree), also known as ordered binary tree (ordered binary tree), sorted binary tree (sorted binary tree).
- "On Algorithms and Data Structures: Seven Binary Search Trees"
-
- "Easiest to understand red-black tree"
- After adding the stage, turn left or right to achieve equilibrium again.
- "On Algorithms and Data Structures: Red-Black Trees of Nine Balanced Search Trees"
- "Easiest to understand red-black tree"
-
-
MySQL is based on B+ tree clustered index organization table
-
"Comparison of advantages and disadvantages of B-tree, B+ tree and B* tree"
- Compared with the B-tree, the leaf node linked list structure of the B+ tree is convenient for library scanning and range retrieval.
-
-
-
Compared with B+ tree, LSM (Log-Structured Merge-Trees) sacrifices part of the read performance in exchange for write performance (by writing in batches) to achieve a balance between read and write. Hbase, LevelDB, Tair (Long DB), and nessDB adopt the structure of LSM tree. LSM can build indexes quickly.
-
-
The B+ tree has good read performance, but due to the need for an ordered structure, when the keys are scattered, disk seeks are frequent, resulting in poor write performance.
-
LSM splits a large tree into N small trees, first writes to the memory (no seek problem, high performance), and builds an ordered small tree (ordered tree) in the memory. As the small tree grows The larger the size, the smaller the memory tree will be flushed to disk. When reading, since you don't know which small tree the data is on, you must traverse (binary search) all the small trees, but the data inside each small tree is ordered.
-
"LSM Tree (Log-Structured Merge Tree) Storage Engine"
-
In extreme terms, the write performance of HBase based on the LSM tree is an order of magnitude higher than that of MySQL, and the read performance is an order of magnitude lower.
-
Optimization method: Bloom filter replaces binary search; compact decimal place tree improves query performance.
-
In Hbase, after the memory reaches a certain threshold, the overall flush is sent to the disk to form a file (B+ number). HDFS does not support update operations, so Hbase performs overall flush instead of merge update. Small trees that are flushed to disk are periodically merged into one large tree.
-
-
-
-
- It is often used for deduplication checking of large-scale data.
- "Java Bitset Class"
- "Java BitSet (bit set)"
-
-
-
"Common sorting algorithms and corresponding time complexity and space complexity"
-
- "Classic Algorithms in Java Selection Sort (SelectionSort)"
- In each pass, the smallest element is selected from the records to be sorted, and the order is placed at the end of the sorted sequence until all records are sorted.
- "Classic Algorithms in Java Selection Sort (SelectionSort)"
-
- "Two Ways to Write Bubble Sort"
- Adjacent elements are swapped back and forth, and the largest one is sorted to the end.
- Time complexity O(n²)
- "Two Ways to Write Bubble Sort"
-
- "Sit on the toilet and look at the algorithm: quick sort"
- One side is larger or smaller than the other.
-
- "Graphic Sorting Algorithm (4) Merge Sort"
- Divide and conquer, divide into small parts and sort, and merge (rebuild a new space for copying).
- "Graphic Sorting Algorithm (4) Merge Sort"
-
- "Graphic Sorting Algorithm (3) Heap Sort"
- The sorting process is the process of building the maximum heap. The maximum heap: the value of each node is greater than or equal to the value of its left and right child nodes, and the top element of the heap is the maximum value.
- "Graphic Sorting Algorithm (3) Heap Sort"
-
- "Counting Sort and Bucket Sort"
- Similar to the bucket sort process, the difference lies in the number of buckets.
- "Counting Sort and Bucket Sort"
-
- "[Aha! Algorithm] The fastest and simplest sorting - bucket sorting"
- "Sorting Algorithm (3): Counting Sort and Bucket Sort"
- Bucket sorting divides the [0,1) interval into n subintervals of the same size, and these subintervals are called buckets.
- Each bucket is sorted individually, and then each bucket is traversed.
-
- Arranged in order of ones, tens, hundreds, ....
- "Sorting Algorithm Series: Cardinality Sorting"
- "Radix Sort"
-
- "Binary search (java implementation)"
- The sequence to be searched is required to be in order.
- Time complexity O(logN).
- "Java Implements Binary Search - Two Ways"
- while + recursion.
- "Binary search (java implementation)"
-
-
Distributed Consensus Algorithm
-
PAXOS
-
Ps
-
Raft
- "Why Raft is an easier-to-understand distributed consensus algorithm"
- Three roles: Leader (leader), Follower (crowd), Candidate (candidate)
- Votes are issued by random waiting, and the one with the most votes wins.
- "Raft Diagram"
- "Why Raft is an easier-to-understand distributed consensus algorithm"
-
Gossip
-
Two-phase commit, multi-phase commit
-