A wrong assumption that programmers new to distributed applications always make.
Misconceptions about distributed systems emerge
reliable network
The network is unreliable and any particular communication may fail
- solution:
- Retransmission
- Storage retransmission (transmission can be resumed after downtime)
no delay
Latency is everywhere, related to the speed of light and the communication distance (or path)
all: the distance between the two systems plays an important role here.
- Reduce the impact of latency
- To shorten the physical distance of system communication
- Transfer as much data as possible per request.
Unlimited bandwidth
The data size that the communication channel can carry is limited.
Although it is necessary to transmit as much data as possible in order to reduce the impact of delay, if the amount of data reaches the bandwidth limit, it will collapse quickly.
Trade off Latency vs. Bandwidth, Trade off
No communication cost
As the number of systems increases, the communication increases, and the cost of communication between systems, which was negligible in the past, becomes higher.
For example: In the past, the systems basically used xml and json for transmission. However, in a large-scale distributed system, communication in json format has become a bit heavyweight.
At present, more communication methods such as grpc are used
cyber security
Vulnerabilities at various levels emerge in endlessly.
This has become even more apparent with the advent of crowdsourced bug bounty programs and major exploits in the news every day.
topology invariant
With the advent of Docker and Kubernetes, the network structure can easily change.
The question exposed is: if a critical part of the infrastructure fails, can the traffic continue to flow to the appropriate destination? Is there a single point of failure?
The network is isomorphic
Distributed systems are very flexible.
Different operating systems, different frameworks, and different data formats may exist in the system,
so interoperability is essential
just manage one system
Systems will inevitably depend on other systems that are out of your control. There will be many systems to be managed
, so it is necessary to consider system dependencies, manage the configuration of each system, monitor and observe cross-system calls
- Infrastructure as Code (IaC)