Foursquare Labs, Inc., is a location-based social app, used by 40 million people worldwide. With Foursquare, people can check in to exchange travel tips and to share their location with friends. More than 1.5 million businesses use the Foursquare Merchant Platform, which helps businesses maintain and cultivate their valuable customer base. Foursquare performs analytics across more than 4.5 billion total check-ins, with millions more being added every day. The company, with 160 employees, is based in New York City, New York, with offices in London, England and San Francisco, California.

Foursquare streams hundreds of millions of application logs each day. The company relies on analytics to report on its daily usage, evaluate new offerings, and perform long-term trend analysis—and with millions of new check-ins each day, the workload is only growing. But the database system Foursquare used for analytics comes with high annual licensing costs, and required the company to spend staff time keeping the system running. “We needed a solution that freed us from licensing fees and let us use our staff time more strategically,” says Jon Hoffman, Software Engineer.

Foursquare was already using Amazon Web Services (AWS) for storage and testing, so the company knew the AWS Cloud could help them cut costs. “We found that Amazon Redshift offers the performance we needed while freeing us from the licensing costs of our previous solution,” Hoffman says.

For its analytics, Foursquare is now using Amazon Redshift and a tool called Tableau, which facilitates running queries on its database. “With Amazon Redshift and Tableau, anyone in the company can set up any queries they like—from how users are reacting to a feature, to growth by demographic or geography, to the impact sales efforts have had in different areas. It’s very flexible,” Hoffman says.

The company uses Amazon Simple Storage Service (Amazon S3) to store images and other data. “We are also using AWS Direct Connect, which has allowed us to keep some pieces of our legacy infrastructure that run best on Amazon Elastic Compute Cloud (Amazon EC2) but still have very low latency running on our own data center,” Hoffman says.

The company also runs test clusters using Amazon EC2. Foursquare can match the size and hardware used for their analytics clusters to their changing requirements. Data scientists can spin up ad hoc clusters for urgent analysis, and engineers can run their own dedicated clusters to test new applications. Amazon EC2 instances run CentOS Linux and use NGINX to route requests to internal services. HAProxy is also used to load-balance.

Hoffman estimates that Foursquare is saving tens of thousands of dollars each year in licensing costs alone. The company is also able to deploy its engineering and IT staff on more strategic, revenue-producing projects, instead of configuring servers and running backup and maintenance.

AWS is flexible enough to enable the company to increase the size of the cluster as necessary. “We can add capacity with a few clicks of a button,” Hoffman says. “Using AWS helps us scale up as our data grows, and as the complexity of our queries increases. And we can spin up nodes dynamically whenever we need them, whether we’re launching a new feature or increasing capacity.”

Using Amazon Redshift has enabled the company to perform more agile analytics while saving costs, Hoffman concludes. “Redshift gives us just want we need.”

To learn more about how AWS can help you launch a mobile application, visit our Mobile Apps details page: http://aws.amazon.com/mobile-apps/.