CUSTOMER'S BUSINESS: Mailgun offers developer-friendly email services that focus on speed, reliability, and unique tracking features all exposed through a RESTful API. Mailgun was acquired by Rackspace in 2012.
CHALLENGES: Mailgun places a premium on message throughput, but also needed an economical and flexible solution for hosting the company’s control panel and website.
RACKSPACE® SOLUTION: Rackspace Hybrid Cloud
BUSINESS OUTCOME: A combination of dedicated and cloud resources allows Mailgun to maximize performance per dollar.
Mailgun offers developer-friendly email services that focus on speed, reliability, and unique tracking features all exposed through a RESTful API. Mailgun was the first company to allow developers to apply server-side logic to determine what happens to their messages, earning a reputation for innovation in a cloud computing world that increasingly caters to developers.
Mailgun places a premium on message throughput, a priority which makes the performance of dedicated hardware their most cost-effective option for mail servers. At the same time, Cloud Servers provides an economical and flexible solution for hosting the company’s control panel and website. This combination of needs makes the Rackspace Hybrid Cloud an ideal platform for Mailgun services, a match confirmed when Rackspace acquired the company in 2012.
“If you look at what the Mailgun product is, it’s essentially a pipe,” Mailgun Co-founder Ev Kontsevoy says. “Most email systems are pipes. You put a message in one end, and it comes out the other. When the response comes in, the same thing is happening in reverse. What you’re optimizing for is maximum throughput, which means network I/O and disk I/O. There is not much CPU-intensive processing happening inside of an email server. This is why, from the beginning, we have been looking mostly at dedicated hosting — simply because dedicated is great at optimizing for I/O.”
“Cloud works fantastically well if you have high CPU or high RAM workloads that are also highly variable: you get featured on CNN or on Oprah and suddenly you have a million people going to visit your website,” he continues. “That is a fantastic opportunity for you to utilize the cloud. With email, it’s never like that. You might have a spam attack or something, but you don’t really need that elastic capability, just a lot of disk and network I/O. This is why Mailgun has always been a mostly dedicated product.”
Not all aspects of Mailgun are reliant on maximum throughput, however. “We do use cloud for parts of Mailgun that make sense,” says Kontsevoy. “Our control panel, which is a website, obviously runs on the cloud. Mailgun.com itself runs on cloud servers, and we use a ton of internal tools like staging environment and source code repository, ticketing system — all these things we run on the cloud simply because it’s faster, cheaper, it’s easier to deal with, you can script it, you can write code against it.”
“Every technology has its limits,” he says. “Every advantage that you get from cloud or from dedicated comes at the cost of something else. It’s always about tradeoffs. Our hybrid architecture offers the best of both worlds, and we’re pretty happy with this setup. This is what we’ve always been doing — before Rackspace and on Rackspace.”
Kontsevoy stresses the importance of choosing a reliable host. “It’s performance per dollar that you need to be looking at. Uptime is not free. It has certain engineering costs built into it. So sometimes you might find a cloud vendor who is incredibly cheap, and it feels like you’re going to get a lot of performance for a dollar. But again, usually if that’s the case, it means that you need to put more money into engineering salaries. You will need to put more money into designing your system to tolerate these deficiencies, to tolerate your cloud components falling apart because you get the cheap provider.”
Speed and reliability of message delivery is important to every Mailgun customer, but it is especially crucial for companies who use Mailgun to provide emergency notifications.
“Response times are extremely important for emergency notifications,” explains Kontsevoy. “I remember one customer who had been using a Mailgun competitor to deliver failure notifications by email, and sometimes their customer’s server would be down, the website wouldn’t be responding, so they would send an email trying to notify the customer and the customer wouldn’t get that email until ten minutes later, fifteen minutes later. When every minute of downtime actually is costing someone money, that’s much too long.”
“They wanted to see if Mailgun could solve this problem, so they wrote a bot that would send messages to itself, receive the messages, and measures the time it takes for the message to get delivered. They ran that bot for a few months I believe, and we consistently delivered very, very low delivery time and they loved it. Eventually, they switched, and to this day Mailgun powers that very critical part of their architecture.”
Since Mailgun was acquired by Rackspace, Kontsevoy says, “Mailgun as a product is pretty tightly integrated with the Rackspace Cloud offering already, but we have recently integrated with cloud control panel so any Rackspace Cloud customer can get a free Mailgun account provisioned.”
“We’re spending a lot of time growing and scaling and making it even more reliable and even faster,” he continues. “We’re looking into launching Mailgun copies in different data centers around the world so that local latency — latency from users to Mailgun — will be much lower.”
“We’re pretty excited about the future and our continuous efforts to improve our services.” he says.
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License