The Secret of dolphins



Everyone knows dolphins are lovely sea animals. But how many people know that dolphins can never sleep.


What is it about dolphins that allows them to stay awake forever? It relies on a special way in which the dolphin’s brain works.




Like humans, dolphins’ brains are divided into two parts: left and right. When the dolphin is active, both the left and right brains are awake:




Of course, dolphins are made of flesh and blood and need rest. When the dolphin is at rest, one half of its brain goes to sleep and the other half remains awake for various external situations.




Every two hours, this half-asleep, half-awake state alternates, such as one moment the left brain is asleep and the right brain is awake, the next moment the left brain is awake and the right brain is asleep.




This is the secret of how dolphins never really sleep.








What is a blue-green deployment?



Blue Green Deployment, also known as Blue Green Deployment, is a Deployment method that ensures that the system is brought online without interruption of service.


How do you ensure uninterrupted service?


The blue-green model consists of two clusters, like the left and right brains of dolphins.





When cluster A and cluster B are offline, their code versions are the same and they provide services at the same time.





When the system is upgraded, we first remove A cluster (such as cluster A) from the load list and deploy the new version. Cluster B still continues to provide services.



When cluster A is upgraded, we redirect the load balance to cluster A and remove cluster B from the load list to deploy the new version. Cluster A provides services again.




Finally, when cluster B is also upgraded, we restore cluster B to the load list. By this time, the versions of both clusters have been upgraded and the external service is almost uninterrupted.









What is rolling deployment?



Rolling Update deployment is also a deployment mode that can ensure the system to go online without interrupting services.


Unlike blue-green deployments, rolling deployments do not provide either/or versions of services, but rather smooth version upgrades at a finer granularity.


How to achieve fine-grained smooth version upgrade?


Rolling deployment requires only one cluster, and different nodes in the cluster can be upgraded independently. For example, in a 16-node cluster, we choose to upgrade four nodes at a time:











And so on, eventually all the nodes are upgraded.










The possibility of immortality







Our body is like a huge and complex computer cluster, and each organ is like a node in the cluster, connected by countless nerves and blood vessels.




To a cluster of computers, continuous service is “alive”. In humans, organs are constantly functioning and vital signs are kept alive.


Human organs will eventually age, and that is the end of the human lifespan. If we replaced each organ in turn with a younger one, whether liver or kidney, muscle or bone, before it aged, could that person stay young forever?



Maybe some people will say, the human brain will also be old, I can’t replace the brain, too? I wouldn’t be me anymore.

However, the human brain is not independent and indivisible. If we think of the brain as a collection of 1,000 or more basic units, replacing only one-thousandth of the brain at a time, then the person is still the same person, and perhaps even the mind is almost uninterrupted.






— — the END — — –



If you like this article, please long click the picture below to follow the subscription number programmer Xiao Grey and watch more exciting content