How 9GAG Scaled Fun to 150 Million Users with Cloudflare

If you’ve ever surfed the web looking for the latest in memes or unusually-talented housepets, there’s a good chance you’ve landed at 9GAG, one of the Internet’s most popular sources of short-form entertainment, with oodles of memes, gifs, and other viral content posted every day. As 9GAG cofounder Derek Chan puts it, “We want to promote the idea of fun.” And they’re doing it at a massive scale.

In the last five years, 9GAG has skyrocketed in popularity: between its website and mobile apps, 9GAG now draws over 150 million unique visitors per month who consume billions of the site’s image assets.

9GAG's Challenge

Growing that big, that quickly, is a recipe for infrastructure hurdles — and 9GAG is no stranger to the associated headaches. 9GAG Chief Technologist and Cofounder Derek Chan says that before switching to Cloudflare, 9GAG used a CDN that couldn’t provide the reliability or features it needed to keep up with its growing audience.

Multiple times a week, users would write in to complain about slow loading speeds — pain that was compounded by subsequent support exchanges and fire-drills as 9GAG’s engineering staff tried to home in on what was bogging down its network. Even worse: 9GAG was facing attacks from hostile actors, who employed a sophisticated botnet to take the site down for an entire day.

Performance is crucial for most web properties, but it’s especially important for 9GAG. Users are often visiting the site for a quick, bite-sized morsel of content; something that will keep them busy during a fleeting moment of downtime. Sluggish loading screens are the opposite of what they’re looking for — and too many slow experiences will lead them to turn elsewhere. For 9GAG, a slow and unreliable site represents an existential threat.

Finally, enough was enough.

9GAG needed a cloud provider that could fend off crippling DDoS attacks — and one that could accelerate performance as much as possible. The team didn’t take any chances as it explored switching to another provider: it put together its own testing methodology, directing 5% of traffic to several content-delivery networks. Then they compared each CDN’s performance in 9GAG’s top geographic regions including Thailand, Philippines, India, and Australia.

The winner — by a large margin — was Cloudflare.

The Cloudflare Difference

Since switching to Cloudflare, Chan says that 9GAG’s performance issues have become a thing of the past. The improvement is especially noticeable in Southeast Asia, where 9GAG used to suffer from significant lag in regions like the Philippines. Today, thanks to the proximity of Cloudflare’s servers in the area — and its overall network spanning 310 cities across the world — 9GAG’s content reaches its visitors much faster and more reliably. Better yet, 9GAG has seen roughly 30% cost savings on its CDN bill since switching to Cloudflare.

And since enabling Cloudflare’s security protection — with features like DDoS mitigation and rate limiting — 9GAG hasn’t suffered any more downtime from malicious attacks.

everything just worked

Cloudflare is built around innovative technology, but there’s no substitute for having a team of experts on call. Chan says that on the rare occasion he’s had reason to contact Cloudflare support, his experience has set Cloudflare even further apart from the competition.

“Some other companies, they may just have an outsourced worker who is not actually solving the issue. After a few days’ wait they ask you to do this or that — and it doesn’t fix the problem.

With Cloudflare, the support staff is very responsive and actually helpful. They dive into the issue and get it resolved.”
- 9GAG CTO & Cofounder
Derek Chan

From performance boosts to peace-of-mind, 9GAG continues to expand its use of Cloudflare to include a range of new services. Cloudflare Access gives employees a secure way to access 9GAG’s intranet, and the company is experimenting with the Cloudflare Workers platform to deploy custom software on Cloudflare’s network edge.

But the thing that makes Chan happiest? The number of messages he gets from frustrated users.

"When we switched to Cloudflare, those emails stopped. That’s the best metric I can think of.”
- 9GAG CTO & Cofounder
Derek Chan
How 9GAG Scaled Fun to 150 Million Users with Cloudflare
Related Case Studies
Key Results

• 9GAG resolved its performance and reliability issues by enabling Cloudflare CDN

• Performance in regions like Southeast Asia improved dramatically

• 30% cost savings on content delivery

• Cloudflare DDoS protection defends 9GAG against attacks

• Cloudflare's support team provides 9GAG with quick and useful insights

Everything just worked when we started serving content via Cloudflare.

Derek Chan
9GAG CTO & Cofounder