r/howdidtheycodeit • u/R_Olivaw_Daneel ProProgrammer • Sep 30 '21
How does Uber/Lyft continuously track drivers and their locations relative to the user searching for a ride?
37
Upvotes
r/howdidtheycodeit • u/R_Olivaw_Daneel ProProgrammer • Sep 30 '21
View all comments
Show parent comment
1
u/spacemudd Oct 02 '21
My reasonings are:
If an issue occures on the American servers, Australian users wouldn't be affected.
The load can be managed per region/area.
There is less risk in managing your business service.
Keeping global traffic going into 1 websocket instance is a high risk since if it goes down, the entire app is unusable.
And if we scale it, how can we share the information between those websocket instances? Imagine this scenario:
Both of these users won't see each other because the scaled instances aren't sharing data.
FYI, Uber released a blog post how they parition the Earth into hexagonal shapes to group up request/dispatch requests into "grids".
https://eng.uber.com/h3/