Thanks for reading systemdesign.one newsletter. If you're not yet subscribed, let me help you with that:
High-Level Design
When a player updates the score, the following tasks are executed:
The client establishes a WebSocket connection to the load balancer for instantaneous communication
The load balancer redirects the client's request to the nearest data center
The server modifies the score in the sorted set data structure within Redis
The serverless function updates the entries in the relational database by utilizing the write-behind cache pattern