- Most of the tech described in the article is something you will have to do whether you choose gRPC or websockets. Most of the tech was about sharding and maintaining sticky connections and load balancing those connections across servers based on load.
- The heartbeat introduced on top of HTTP was needed to detect the broken connection faster and recover quickly as some of the payloads were very latency sensitive. Note that these connections are not 1:1 connections but have multiple hops across low bandwidth mobile networks.
- At the time we developed this initially in 2014, most of the WebSockets libraries would fallback to longpolling when the network connections were unstable. We explicitly went away from long polling. Since server->mobile payloads are the larger of the volumes, we settled in on SSE. Netty and the netty libraries provided most of the implementations of SSE out of the box.
> ...
> Additionally, Node.js workers were single threaded and would have elevated levels of event loop lag resulting in a further delay in the convergence of membership information. These issues could result in topology information that is inconsistent and lead to message loss, timeouts, and errors.
>
> In early 2017, we decided that it was time for a reboot of the server implementation of RAMEN protocol to continue to scale. For this iteration we used the following technologies: Netty, Apache Zookeeper, Apache Helix, Redis and Apache Cassandra.
Yet another example of why starting with Java, .NET or similar stacks avoids rewrites.
Realtime push technically exists in every chat app on your mobile phone, so it's not a great technical feat either. Am I missing something?
For Uber’s use case I don’t see a reason to build the system that requires global scale. Users are often residing in the same geolocation. Why build this massive system that works for all instead of building smaller decentralized edge systems that does slower syncs in the back?
Very nice read nonetheless.
- we separated payload from notification, now client is pulling payload on notification.
a.) necessary, and saves the company millions
b.) a simplification over the ... unusually ... architected system that came before and did not scale.
there's a lot of junk technology at many large tech companies, but scaling problems /are/ real when you have hundreds of millions of users and have demanding performance and reliability requirements. RAMEN is a differentiated and necessary part of Uber's infrastructure, even if that can't be said of a lot of uber eng blog posts.
My guess is because doing this in Java is a huge pain whereas it’s practically a breeze in something like elixir.
1.5 million? I thought Uber would have more simultaneous active clients than that.
1.5 million concurrent connections would then represent roughly .15% of their total user base[1]. Hard to say whether that's accurate or not. I certainly use Uber less than .15% of the time but I imagine big events like New Year's see huge spikes in usage.
[1]Number of downloads isn't totally accurate for estimating user base but I'm not sure of another way. Also, article mentions that their system powers over 10 different apps but I'm assuming that the those numbers are negligible compared to the main Uber app.
gRPC (or more: HTTP/2) will win if the amount of request-levle concurrency that is required is extremely high. But in that case also the danger of head-of-line blocking between the various HTTP/2 streams gets higher.
wonder if this 'fireball' tool is really a general way to map realtime messages onto schema updates -- if yes, could potentially get uptake on other teams (if their schema format is at all portable)
I’ve not fully understood how they can lose so much money given their fee per ride is so much higher than most apps would dream of for revenue
[0] https://techcrunch.com/2020/12/07/uber-sells-self-driving-un...
I'm curious would this essentially be sharding on HTTP headers that indicate payload type? Can anyone say?
No wonder they need 1000s of SWEs.
UDP on mobile networks is a royal pain because of symmetric NATs [1]
[1] https://en.m.wikipedia.org/wiki/Network_address_translation#...
Other than that, NAT timeouts for UDP are probably a lot lower than TCP, so you likely need to ping more often to keep things active (but you should track this by network and adjust accordingly)
I don't see TCP/HTTP as a reliable protocol over unreliable networks. I mean they are sending hearbeats over HTTP. It is silly.
After reading the FAQ I am still not sure about its value propositions. Also I don't understand how "streaming responses and push" is different from the classic pub/sub model that so many websocket frameworks are offering.
I tried to avoid socket.io partially due to irrational preconceptions but then learned that it has a lot of features that are needed in many applications. It's also used by many people and has integrations into virtually every server and client framework.
I actually looked it up.
https://en.wikipedia.org/wiki/Real-time_web
It feels like something a SW company wrote up for the sole purpose of making up the idea.
The "Difference from real-time computing" is uncited. Hell the entire thing is uncited except for Real Time search, from Google.
The Uber system is not real time. It's entirely possible that every switch and router between you and the Uber server has it's buffers full. Round trip time is entirely unbounded over the internet. You could say their system is "fast" or "responsive", but "real time" is not a marketing buzz word, it has technical meaning.
IDK why OP chose to link to that weird article to try and illuminate this point.
[1] https://en.m.wikipedia.org/wiki/Stream_Reservation_Protocol
Your comment is like complaining that people writing a cryptocurrency blog use the word "crypto" wrong because obviously it means cryptography.
Given the necessary UX and the fact that Uber charges you if you don’t turn up for the ride, I’d say this absolutely has a bounded latency defined in their charging policy.
Real-time systems can have any bounded latency, it doesn’t have to be “fast”. I’d say Uber probably have a few hard-real-time systems around 5 minutes of latency, and a lot of soft-real-time systems around the latency of either 15-30s or around the duration of an Uber ride.