The cloud takes away the infrastructure strain at Just Eat

Profile picture for user slauchlan By Stuart Lauchlan May 28, 2015
Summary:
Pizza? Burger? Sushi? Take your pick from a wide local list as Just Eat scales in the cloud.

Daniel Richardson
Daniel Richardson

You know how it is - it’s been a long day at work, you’ve slipped in for a quick drink on the way home...which turned into several quick drinks. Now you’re home and you can’t be bothered to cook. So what do you do? You send for a takeaway.

But which to choose, which to choose? Chinese? Pizza? Burgers? Mexican? Sushi? Fish and chips and a pickled egg? That’s where Just Eat comes in. It’s the world’s leading online takeaway marketplace, operating across 13 countries.

It’s a major success story and one that like so many such stories is built on the simplest of business models, as Daniel Richardson, Director of Engineering at the firm, explains:

There are millions of hungry customers out there. There are thousands of restaurants which specialise in cooking great food that customers want to order from. More and more of them want to order online, typically from mobile devices. Just Eat provides the technology for customers to do that, allowing restaurants to focus on what they do best, cooking and delivering the food.

So far, so simple. An online listing of local takeaway outlets from which you can order without having to root around in the kitchen cabinet looking for a flyer. There’s also some TripAdvisor-type recommendations from other takeaway lovers to give you a steer on which outlet to choose from.

But underpinning this elevator pitch is a highly complicated technology platform that Richardson and his engineering colleagues need to support and enhance. But what these people really need to be doing is finding new features and functionality to enhance the customer experience of using Just Eat, not having to spend too much time ‘keeping the lights on’ and supporting infrastructure.

With that in mind, the firm has looked to the cloud, with Amazon Web Services providing the platform for much of the company’s operational infrastructure needs. Having the infrastructure in the cloud also provides for a development platform that allows engineers from around the company to spin up new ideas and trail them on the back of internal hackathons. Richardson explains:

We get groups of engineers together from around the company and they get a few days or a week to work together on whatever they want. They scratch an itch, they come up with a new idea, they build it, they demo it and we vote on the ideas at the end. The best ones we push live.

We want to do that as quickly as possible. We're not short on ideas. What we want to do is try out as many as possible and to shorten the time between having an idea and getting it out in front of customers and discovering if this is something great.

One recent example of this in practice was the notion of randomly giving away free takeaways. Richardson explains:

You place your order and at the end we tell you, 'This one's on us'. That might be random, we might target it at particular towns or particular times of day. This team were able to get that idea out live within just about over a week because they were able to work independently because our platform is in the cloud.

To build a feature like this they need a database, they need some computing capacity but they don't know how much upfront. The cloud allows us to scale and to provision that on demand as needed. They don't need to go to an operations team and get sign-off because it's going to be relatively cheap to run this in the first instance.

So that allows a group of engineers to go off and work with someone in the marketing department, build this cheaply, get it up and running completely independently without anybody else, without waiting for anyone else or for an operations team to provision new hardware for them. They put it out live. They can see the impact, see the effect and if there's something that turns out to be a great idea, then we can do the long term planning and how much will this cost.

Where's my dinner?

Free takeaway is all good and well, but as soon as you’ve placed your order the burning question is always - where’s my food?

Richardson reckons that there’s typically a window of around 30 minutes before customers expect to be able to collect food in person and 45 minutes before they expect a knock at the front door. What this means is that there is no room for mistakes:

If it takes 10 minutes instead of one minute to get the order to the restaurant and get confirmation back, that’s ten minutes that's been added to the time that it's going to take the order to turn up. Customers aren't going to be very happy when it takes 55 minutes instead of 45 minutes for the food to turn up.

But of course failure is inevitable at some point and needs to be planned for:

We have some hardware in every restaurant that we work with, terminals or tablets, and these connect to our systems running in the cloud. Cloud everywhere has failures and our code has bugs. We have bad deployments, we have issues, networks have problems. You plan for that failure. If we lose connection with some of our restaurants and the food stops turning up, customers are still placing orders, but we can't get them to the restaurant. That causes a problem for customer care. We get over 1000 orders a minute at peak .

We run engineering teams that are responsible for their code all the way through to production. This heavily incentivises them to ensure that they automate as much as possible. The key to running in the cloud is the APIs that the likes of Amazon can provide. So our engineers can treat the infrastructure just like they treat their code.

It's very easy to monitor the infrastructure and look for failures and then to automate the recovery of it. If we spot a problem, we can just throw away that instance that we've got in EC2. We can just terminate it and bring up a new one automatically. Then we can reconnect the restaurants and get the orders flowing again and get the food turning up.

images|cms-image-000000792
Valentine's Day delight?

The cloud’s scalability also allows Just Eat to cope with high days and holidays, such as Valentine’s Day or New Year’s Day, when demand for takeaway deliveries peaks. Richardson says:

Running in the cloud gives us two things. It allows us to over-provision very confidently because it's cheap to do so. We don't worry if we have to double the number of web servers that we're running because we know that if we have to do that for a few hours, it's going to cost us a few tens of dollars. It's not a big effort. We're not going to have to outlay thousands of pounds and watch and see that resource not actually being used. Also if we have underestimated, within a few minutes we can add new capacity to our platform and be running more web servers and handling more traffic.

Richardson concludes:

There are loads of different ways that the cloud has helped Just Eat focus on what's important for customers and restaurants. Our engineers time is probably the most precious thing we have. Making the best use of engineers time once they're in the company is absolutely critical to Just Eat and making sure that we're focusing on those things that directly impact on restaurants and customers, that differentiate us from our competitors. The biggest competitor is just people picking up the phone.

My take

The simple ideas are always the best.

This is also a prime example of an organization using the cloud to enable its engineers to remain focused on the most important thing: keeping the customers happy.

Just one question -  who orders takeaway for Valentine's Day?

Disclosure: Daniel Richardson was talking at Whitehall Media’s Enterprise Cloud Computing and Virtualisation conference. diginomica is an affiliate partner of Whitehall Media.