onemoredata / bagger

Massive log storage in PostgreSQL
BSD 2-Clause "Simplified" License
9 stars 0 forks source link

Autodetect number of hosts to rotate servermap #70

Closed einhverfr closed 8 months ago

einhverfr commented 8 months ago

This fixes #61. If there are a number of Bagger instances on the same host in the middle of the list, we will detect and rotate accordingly.

The new logic is to rotate by the maximum number of bagger instances hosted on the same physical host. In the case where someone has more than half running on the same host, then some failure tolerance will be lost, but that's their fault. I suppose if it becomes critical we can detect and warn in that case, but I doubt it will be a serious problem at scale.

einhverfr commented 8 months ago

Note that in this particular case the test cases still passed because the number of items to rotate were more.

Also this should perform better with large numbers of hosts.