If there’s one thing that users hate, it’s waiting. Waiting for messages to go through or arrive. Waiting for things to load or connect. Waiting for services to just work. Latency causes a lot of waiting in many applications, so it’s always good to see companies making it a high priority to reduce the amount of waiting required to use our favorite apps.
Voxer has taken it upon itself to do just that with its push to talk application and has been working to lower the latency across the board for its users, who naturally send more messages as the latency is reduced. Voxer’s data confirms as much.
Users send more messages in services with lower latency
We’ve done a lot of optimizations on the backend to improve the performance of our technology stack: node.js, riak, redis, and SmartOS, the company posted. The next set of improvements we have been working on are at the network protocol level by tuning stud and moving to the SPDY protocol, which forms the basis of HTTP 2.0.
Voxer utilized HTTPS on its mobile clients in the past, but says utilizing the technology had caused a number of performance issues due to the “unpredictable” nature of mobile networks.
Even using persistent connections and HTTP pipelining, we used a pool of HTTPS connections to reduce client latency and to address issues like head-of-line blocking, Voxer said. Negotiating and maintaining a pool of TLS connections is complex and slow, and we haven’t found a library that does this well on iOS.
Meanwhile, utilzing SPDY allows Voxer to make the application easier to maintain due to the technology’s single TCP socket for all requests, which streamlines the app’s processes. iSPDY was chosen by Voxer at a time when Twitter’s new CocoaSPDY library was unavailable, but the company has decided to stick with SPDY; the server push being offered within SPDY is “ideal” for achieving Voxer’s goals at lowering the latency in its app.
Aside from lowering latency, Voxer’s design goals for iSPDY also include:
- low latency tuning options
- low memory footprint
- server push stream support
- priority scheduling for outgoing data
- trailing headers
- ping support
- transparent decompression of response using Content-Encoding header
- background socket reclaim detection and support on iOS
- VoIP mode support on iOS
- optionally use IP instead of DNS name to connect to server and save DNS resolution time
If you’ve got a little engineering experience, you can have a little fun with iSPDY yourself via github.