2 ms·
I just had a flashback of creating a forwarding-buffer-queue on memcached, a complete abomination but it was able to drastically reduce the load on the endpoint
by sitkack 3y ago
I just had a flashback of creating a forwarding-buffer-queue on memcached, a complete abomination but it was able to drastically reduce the load on the endpoints that saved game progress in a casual game.
It updated or created an entry for each call. But if a buffer was already in the queue, it would write the most recent one into the existing slot. This had the effect of reducing the load by the multiple of the update rate. So if you had clients sending save game payloads every 30s and your queue depth is 2.5mins, then your write rate to disk is 1/5. I think.
But memcached wasn't Redis, this was pre-Redis, and memcached could have evicted any of those keys at any time. We gave it lots of space, it never GCd, we never needing to fix it. The game slide from above the fold and wasn't fun enough to be viable long term.
One of my proudest Scotty Engineering moments.