VIEN
DevOps

MongoDB 4.4 to 8.0 without stopping sales

Four major versions and two OS replacements, on a live database cluster serving a whole retail chain. The stores kept selling the entire time.

4major versions: 5.0, 6.0, 7.0, 8.0
~280 GBlogical data
1 dayfor the whole upgrade path

how it works

the problem

The three-node MongoDB 4.4 cluster was out of support. MongoDB doesn't allow skipping: it has to go 5.0, 6.0, 7.0, then 8.0. Two nodes ran Debian 10, which can't run 7.0 or later, so their operating system had to be replaced halfway through.

Each disk had about 58 GB free, not enough for a 280 GB backup in place. And the ERP had to stay up.

results

  • From 4.4 to 8.0 in one day, with stores selling as usual.
  • Zero application connection failures after moving to 8.0.
  • Redis and Sentinel moved to the new machines at the same time: add replica, fail over, retire the old box.
  • Every step is written down as a run-book, so next time is just reading.

stack

MongoDB 8.0Replica setmongoshDebian 12Redis SentinelXFS

want something like this?

Tell us about your problem. We reply within one working day.