开发者

How do big companies (like, say Facebook) do migrations without having downtime?

开发者 https://www.devze.com 2023-03-21 00:07 出处:网络
OK, a small company can just notify their users, then 404 their website while they upgrade their datab开发者_高级运维ase / code. But this is kind of ugly, and discourages regular iterations.

OK, a small company can just notify their users, then 404 their website while they upgrade their datab开发者_高级运维ase / code. But this is kind of ugly, and discourages regular iterations.

How do really big companies (like Facebook) do migrations, without having downtime?


The key component is the database. A method that I've seen involves using replication to mirror data across two servers. Once this is setup, the primary database server can be upgraded while the application servers are pointed at the secondary (replicated) server. Once the primary DB upgrade is complete, application servers can be lazily upgraded and pointed at the upgraded DB. The trick is ensuring that the app servers can deal with multiple DB schemas. To do this, you're looking at having several clusters of servers behind some sort of load balancing appliance. It's not cheap :).


They use clustered solutions with massve parallelism, so they can take one server out of the cluster without impacting service, upgrade it, then put it back in the cluster. This typically requires releases to be backwardly compatible.

0

精彩评论

暂无评论...
验证码 换一张
取 消