Grofers: Building a hyperlocal delivery service using Google Cloud Platform

India-based Grofers is a hyperlocal mobile platform that delivers groceries, fruits and vegetables, cosmetics and electronics. Customers use Grofers’ mobile app to shop for products from local stores in 17 cities in India.

In 2015, the number of deliveries Grofers fulfilled was growing at the rate of 10 times a month, and its delivery system struggled under the stress. When traffic spiked on weekends, its database frequently crashed. Fulfilling and delivering orders depended on manual processes such as telephone calls. Grofers needed a solution that would allow it to quickly scale and improve its delivery process.

“Our customer experience and reputation were taking a hit because our logistics system couldn’t keep up with the number of orders being placed. We chose Google Cloud Platform because it scales instantly from one thousand orders to one million orders while offering tools for quickly developing powerful apps.”

— Rohit Prakash, Associate Vice President of Engineering, Grofers

Building an entire backend in two weeks

When Grofers launched in 2013, the logistics system was entirely manual. Staff at the headquarters called delivery drivers with order details and delivery addresses. Drivers then decided what order to pick up goods from local merchants. With a small number of customers and orders, that wasn’t a problem. But the manual system couldn’t handle growth. Grofers recognized it had to automate the system.

To do that, it turned to Google Cloud Platform. Grofers built a new backend for its delivery system using Google App Engine. When an order arrives, the new system looks at the status of all drivers — including their current location, the order he’s completing, and the pickup and delivery locations on the route. Based on that information, the system calculates the optimal driver for each order and sends the driver the order via a mobile app.

The system also takes advantage of Google Cloud Endpoints, which generates libraries for Javascript, iOS and Android. Grofers used Google Cloud Endpoints to create mobile apps to communicate with its delivery staff.

“In only two weeks, I built the entire backend, including the mobile apps, using Google App Engine. It’s extremely easy to use and has no learning curve. I didn’t have to hire dedicated app experts, which saved us time and money,” Prakash says.

Scaling fast, dramatically improving delivery metrics

With the new backend and mobile apps, Grofers can scale quickly to keep up with its rapid growth. Grofers now delivers 70,000 orders per day, up from 10,000 before the GCP deployment, and has had 100 percent uptime. Each driver handles an average of 15 orders per day, compared to only five previously, letting Grofers handle more work with less staff. All this has been accomplished at very low cost: Prakash says that GCP costs account for only two percent of the company’s infrastructure spending. Without GCP, Prakash says the backend would be far more expensive and account for up to 50 percent of the company’s infrastructure expenses.

“With Google Cloud Platform we had a very small learning curve and no setup time. We now have a low-cost platform that can handle 70,000 orders per day and more no matter how large we grow,” Prakash says.