Foursquare makes apps to help people keep up and meet up with friends, and discover great new places. The company recently introduced Swarm, an app that lets people broadcast exactly where they are, or what neighborhood they're in, and make plans with their friends. The company will also introduce a new version of Foursquare later this summer, which will completely reinvent local search and discovery. Foursquare designed their entire software stack to be as flexible and scalable as possible. They were looking for a similarly flexible content delivery network (CDN) to act as an extension of their apps and improve API performance. The ability to control and fine-tune application performance in real time was a top priority.
When evaluating CDN solutions, Foursquare was impressed with Fastly’s quick and easy configuration process, which allowed them to set up services and immediately begin testing performance against their previous set up. Because Fastly is built on Varnish, an open source software that allows users to fine-tune caching, Foursquare’s team was able to instantly deploy custom Varnish-based configurations to the edge.
"The ease of getting tests set up out of the gate was definitely a benefit with Fastly. It was like pulling teeth with other CDN providers to even get things across to them." Ryan Landry, Director of Network Engineering
Foursquare hosts their infrastructure at Equinix’s Virginia facility and was previously terminating SSL centrally, which introduced significant latency to their API’s performance. Foursquare saw immediate performance gains after switching to Fastly and moving SSL termination to the edge, closest to the users themselves.
With Fastly performing the SSL handshake at the edge servers closest to app users, Foursquare cut setup latency by approximately 150 milliseconds, a significant improvement in performance.
When we added Fastly for the API component, the performance advantage for our users was clear. When you’re sitting there waiting to check in, or when you’re first firing up the app, you’re presented the home screen or feed 150 milliseconds faster." Ryan Landry, Director of Network Engineering
Fastly gives customers the flexibility to completely control their service configuration. Foursquare was able to quickly and easily customize their CDN setup via Fastly’s control panel and utilize the Fastly API to upload custom VCL configurations.
Using Fastly, Foursquare can control what content is cached as well as what data is streamed using Fastly streaming logs, providing them with the necessary information to troubleshoot any issues.
"We’ve found Fastly’s logging feature to be super useful for troubleshooting. We can basically use the Fastly stats as if we had black boxes everywhere." Rob Joseph, Director of Site Reliability
Foursquare is now transitioning into their own data center, a move made possible by Fastly’s support.
"Being able to offload SSL termination and DDoS protection to our CDN has allowed us to move more fully into our data center. There were some aspects of our services that we would have been uncomfortable moving without the protection of Fastly." Rob Joseph, Director of Site Reliability