Quantcast
Channel: DoorDash Newsroom
Viewing all 711 articles
Browse latest View live

Prabir Adarkar Joins DoorDash as Chief Financial Officer

$
0
0

We are thrilled to welcome Prabir Adarkar as our CFO! Prabir joins us from Uber, where he led their Global Finance team of 500+ and served on their Executive Leadership Team. In addition to his experience at Uber, Prabir led M&A transactions at Goldman Sachs and worked in strategy consulting at McKinsey & Company. Prabir will be joining DoorDash in August, reporting to the CEO and serving as a member of the Management team.

“Having spent over 40 hours in the past two months with Prabir, I can tell you that he’s got a sharp mind, possesses an owner’s mentality, and leads from the front,” said Tony Xu, co-founder and CEO of DoorDash.

Prabir brings significant financial, operational, and leadership expertise to DoorDash at a critical time in our life. This year we are tripling our geographic footprint to 1,600 cities and hiring 250 people across corporate offices to aggressively scale our platform. We’re confident that the things that have achieved sustainable growth at DoorDash will continue to accelerate under Prabir’s management.

“DoorDash is a proven pioneer in on-demand logistics, which presents a massive market opportunity in today’s economy,” said Prabir Adarkar. “I’m honored to join an exceptional team and build a multigenerational company that improves the lives of merchants, customers, and Dashers.”

We couldn’t agree more, Prabir, and we’re excited to accelerate our ambitious plans for future growth together. Welcome to the DoorDash family!


Prabir Adarkar Joins DoorDash as Chief Financial Officer was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.


How Artificial Intelligence Powers Logistics at DoorDash

$
0
0

By Raghav Ramesh

In May, DoorDash participated at the O’Reilly Artificial Intelligence Conference in New York where I presented on “How DoorDash leverages AI in its logistics engine.” In this post, I walk you through the core logistics problem at DoorDash and describe how we use Artificial Intelligence (AI) in our logistics engine.

LAST-MILE LOGISTICS IN A THREE-SIDED MARKETPLACE

Fulfilling deliveries at DoorDash requires effectively balancing the three-sides of the marketplace — the Merchants, Dashers and Consumers — and identifying the best Dasher to pick up a delivery from the Merchant and bring it to the Consumer.

Determining the optimal solution to this problem (referred to as the Vehicle Routing Problem) is NP-hard. The real-time, quick-turnaround nature of DoorDash introduces additional challenges: delivery requests come in continuously, Dashers constantly are in movement, and variance in restaurant operations and real-world events (traffic, weather, etc.) have pronounced effects on the solutions.

USING AI TO ACHIEVE OPERATIONAL EFFICIENCIES

To solve these problems more efficiently, DoorDash leverages various artificial intelligence (AI) and machine learning (ML) techniques to intelligently model the decision space and achieve near optimal solutions in seconds. Ultimately, across DoorDash’s tens of millions of deliveries, these techniques have led to shorter delivery times for Consumers, higher pay for Dashers, increased income for Merchant partners, and a better experience for all sides of the marketplace.

In my talk, I start with an overview of AI applications at DoorDash, then talk about how machine learning techniques complement traditional operations research techniques to enable logistics at DoorDash. In particular, I dive into two specific applications of machine learning: predicting delivery lifecycle timepoints and batching algorithms.

We would love to hear your thoughts on the AI techniques and applications at DoorDash. And if you find these problems interesting, come join us!

Raghav Ramesh is the lead machine learning engineer at DoorDash working on its core logistics engine, where he focuses on AI problems: vehicle routing, Dasher assignments, delivery time predictions, demand forecasting, and pricing.


How Artificial Intelligence Powers Logistics at DoorDash was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

DoorDash Delivers Good Inside and Out as an Awarded “Best Place to Work”

$
0
0

By Sarah Wagener, Chief People Officer

As a company, DoorDash is committed to delivering good by connecting people and possibility — whether by offering convenience to families, providing flexible work opportunities to help people fulfill their dreams, or bringing new customers to business owners. It is something that has always been intrinsic to our culture and is part of the very fiber of what all of us at DoorDash seek to accomplish for others, and for ourselves, every day. That’s why we’re honored to have recently been recognized as one of San Francisco Business Times’ “Best Places to Work.”

Employees celebrating Pride Month

What truly makes DoorDash stand apart are the people within the company. DoorDash is bursting with exceptionally talented, smart, driven people who take ownership in making sure the company succeeds — but most of all they are kind, empathetic and respectful. Employees come into work radiating positive energy and a connection to our values that the entire company thrives on. It’s one of the traits I noticed most during my first couple of months at DoorDash, and that contributes to our impact as a brand that delivers good. If we can stand behind these values internally and build a business where employees are inspired and energized to come to work, we’ll be more successful as a team and a better company overall.

This recognition comes as the company is continuing a year of high growth, expanding into new markets and hiring more than 200 new team members across the US and Canada. While we’re growing quickly, we remain focused on our employees and this award is a testament to those efforts. DoorDash was founded to help people thrive in the digital economy and help entrepreneurs achieve their goals, so it’s clarifying to see the same determination, heart and soul delivered inside the walls of our offices.

If you’re interested in joining the DoorDash team, check out our open positions — we’d love to hear from you! It would be awesome to deliver good — together!


DoorDash Delivers Good Inside and Out as an Awarded “Best Place to Work” was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

Now Dashing in Greenville, Knoxville and Syracuse

$
0
0

By Brent Seals, Head of Launch

DoorDash is expanding to Greenville, South Carolina; Knoxville, Tennessee; and Syracuse, New York!

Use code GVEDASH for $5 off orders of $15 or more, valid through 8/25

Starting today, DoorDash will be available in more than 400 restaurants in Greenville and Spartanburg. Customers in the area can order DoorDash between the hours of 11 a.m. and 10 p.m. from a wide selection of local and national favorites, including: American Burger Co., Sticky Fingers Ribhouse, The Cheesecake Factory, Buffalo Wild Wings, P.F. Chang’s, Wendy’s, and Red Robin Gourmet Burgers and Brews. Neighborhoods available include: Greer, Duncan, Mauldin, Startex, Magnolia Acres, Whitney Heights, Ashley, Brookhaven, Taylors, Wade Hampton, Fairforest, and Zion Hill.

To celebrate the debut of DoorDash in Greenville, deliveries for the next month will be $1.99, with a free delivery for first-time users. Customers can also use the code GVEDASH for $5 off orders of $15 or more through August 25th, 2018.

Moving down South…

Use KNXDASH for $5 off orders of $15 or more, valid through 8/25

Knoxville locals now have delivery access to their favorite local and national heroes with DoorDash. Residents living in North Knoxville, South Knoxville, Wooded Acres, Powell, Woodfield Park, and Woodland Acres can get their favorite menu items delivered with DoorDash from staples like The Cheesecake Factory, Buffalo Wild Wings, P.F. Chang’s, Wendy’s, and Red Robin Gourmet Burgers and Brews.

Calling Central New York (CNY) Pride Fans!

Use SYDASH for $5 off orders of $15 or more, valid through 8/25

Today, DoorDash is available in the greater Syracuse area, in neighborhoods including: Onondaga Hill, Airport Plaza, Armory Square, North Syracuse, Taunton, Liverpool, Syracuse University, Le Moyne College, Solvay, Westvale, and Northside. Customers can access their favorite national staples like The Cheesecake Factory, Buffalo Wild Wings, P.F. Chang’s, Wendy’s, and Red Robin Gourmet Burgers and Brews. Check out our website at DoorDash.com or mobile app to find more of your local hotspots.

To celebrate the debut of DoorDash in Syracuse, deliveries for the next month will be $1.99, with a free delivery for first-time users. Users can also use the code SYDASH for $5 off orders of $15 or more through August 25th, 2018.


Now Dashing in Greenville, Knoxville and Syracuse was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

Now Dashing in Reno and Naples

$
0
0

By Brent Seals, Head of Launch

DoorDash is expanding to Reno, Nevada and Naples, Florida!

Calling the Biggest Little City in the World…

Use code DASH2RENO for $5 off orders of $15 or more, valid through 9/1/2018

DoorDash is now available in the greater Reno and Spark cities, with more than 800 restaurants open for delivery with DoorDash. Customers in the area can order with DoorDash between the hours of 11 a.m. and 10 p.m. from a wide selection of restaurants including Beach Hut Deli, The Cheesecake Factory, Buffalo Wild Wings, P.F. Chang’s, Wendy’s, Red Robin Gourmet Burgers and Brews, and Jack in the Box.

With our entry into Reno, DoorDash is now available in 1,000 cities across North America. To celebrate this momentous city milestone, DoorDash will donate $1.00 between Feeding America and the Food Bank of Northern Nevada (FBNN) for each order placed in Reno for the entire month of August!

But that’s not all! Lucky Reno locals can enjoy all deliveries from DoorDash for the next month for a mere $1.99, with a free delivery for first-time users. Users can also use the code DASH2RENO for $5 off orders of $15 or more through September 1, 2018. So spread the word, support your local restaurants, and give back to your local food bank!

But that’s not all…

Use code DASHNAPLES for $5 off orders of $15 or more, valid through 9/1/2018

We’re dashing across the Sunshine State, debuting in Naples, Florida this week. Residents of Ft. Myers, Naples, and Cape Coral can order from over 800 restaurants available for delivery with DoorDash. Locals can choose a great selection of local hotspots like Burntwood Tavern, and national classics including The Cheesecake Factory, Buffalo Wild Wings, P.F. Chang’s, Wendy’s, and Red Robin Gourmet Burgers and Brews.

Continue to check back each week to find out which cities we’re launching in next. Up your party game this summer and beat the heat with a great selection of local and national favorites, available for delivery with DoorDash.


Now Dashing in Reno and Naples was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

Avoiding cache stampede at DoorDash

$
0
0

By Zohaib Sibte Hassan, Software Engineer at DoorDash

One of the core mottoes on the engineering team at DoorDash is:

We are only as good as our next delivery!

With high traffic loads and orders flying in, every engineering decision has a critical impact on what our customers, merchants, and dashers will experience. We have to pay careful attention to the details and performance of the system to ensure all three sides of the business are operating flawlessly.

The game of caches

Caching is one common, and well-practiced way to reduce load on database and improve latency for any particular service. This is usually effective for read intensive systems e.g. fetching a menu for a restaurant. In-memory data stores such as Redis, and Memcached are commonly used tools for such a task; though they introduce additional serialize/deserialize, and network overhead. This overhead can be reduced with the help of in-process thread-safe cache (usually an LRU hash map). This in-process cache serves as an L1 cache, while Redis serves as an L2 cache, and the DB serves as master.

A typical caching setup

Reads are optimized when the L1 cache has been populated with required entries. The problem arises when there is a cache miss, which can be due to cache expiration, deployment roll-out, or a server restart. In this case, new requests must go to L2 or DB to read the value again. Doing so during peak hours, and high load can result in multiple parallel duplicate reads. This behavior is usually known as Cache stampeding or Cache Miss Storm, which causes a spike in both network traffic and latency.

Existing work

There are some existing approaches that rely on locking, or an external system refreshing the cache, or probabilistic early expiration. At DoorDash we wanted to solve the cache stampede that could be caused by a L1 cache miss, resulting in parallel duplicate reads to L2 or DB. Using built-in constructs from Kotlin coroutines we solved the problem without inventing another complex library. Towards the end of this post we will share some numbers and results we achieved. We heavily rely on GRPC, Netty and Kotlin coroutines to keep the internal microservices performant. This article assumes that readers have some basic understanding of coroutines, or the equivalent in their technology stack (Go calls them go-routines, C# calls them tasks, Python 3 also calls them coroutines etc.). While the solution discussed here is more specific to Kotlin, the general idea holds true everywhere and works really well for any event loop based async system. For example, the same effect can be achieved using Node.js promise with a simple dictionary.

The debouncer approach

To solve the problem, we took inspiration from something front-end engineers use frequently. Debouncing is a common practice in the JS world to prevent duplicate events from firing and causing noise in the system. A well-known way to create a debouncing function looks something like this (using lodash or underscore.js):

let debouncedFetchData = _.debounce(fetchData, 100);
// use debouncedFetchData …

The above line creates a debounced function that delays invoking fetchData until after 100 milliseconds have elapsed since the last time the debounced function was invoked.

We wanted something similar to debounced function, but instead of waiting for 100 milliseconds, the winning coroutine among racing coroutines should quickly return a Deferred, and the remaining coroutines should wait on the returned Deferred rather than spinning up their own read. Different technologies have different names for Deferred, JavaScript has Promise, C# has Task and so on. This debouncing can be grouped on an operation ID. For example, if we are trying to fetch a menu from Redis or Database with ID 701064, we can use restaurant-fetch-701064 as a key to uniquely identify the operation. This operation may internally use exponential back-offs, call another service, read L2, fall back to database, or it might end up reading multiple tables to produce one value; but it should uniquely identify an operation that we want to deduplicate.

Our solution relies on a coroutine-safe (just like thread-safe) scoreboard that tracks pending Deferred using an ID. After a coroutine has been scheduled to fulfill a Deferred against an ID, the subsequent coroutines with the same ID use that pending Deferred to wait for results. Once Deferred completes, it is removed from scoreboard. The reader code looks something like this:

The method getRestaurantMenus, when simultaneously invoked by many coroutines, will result in one of the coroutines winning the race condition and successfully entering the body to execute fetchMenuFromRemoteCacheOrDatabase. This debounce method immediately returns Deferred<List<Menu>> to all coroutines while the fetchMenuFromCacheOrDatabase executes. All of the coroutines then proceed to await in order to read the results.

How does the debouncer actually work? In the code above, CoroutineDebouncer(ConcurrentHashMap()) relies on computeIfAbsent to create or read a Deferred atomically (be aware of map implementation you use, make sure the implementation applies the function only once). The precise implementation is dead simple and looks like this:

The computeIfAbsent allows us to launch an async callback that is scheduled for execution, and once completed we do remove from the pending board. For the ConcurrentMap parameter required in the constructor, we used a ConcurrentHashMap for simplicity, but this can be replaced with a NonBlockingHashMap for a higher performing lock-free map, or with your own custom implementation that guarantees atomic operations.

Comparing apples to apples

After applying the changes to our microservice, we benchmarked our new version against the old version. Our machine was MacBook Pro 2.2 GHz i7 with 16GB of RAM and JVM flags -Xms2g -Xmx2g -XX:+UseConcMarkSweepGC -XX:+ParallelRefProcEnabled -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=60.

The GRPC endpoint being tested is performing a full read through operation ranging from an L1 cache (5 seconds TTL), an L2 cache (10 seconds TTL) and finally falling back to our Postgres database. We used ghz to benchmark service for 60 seconds with 2000 concurrent connections and no rate limit. We explicitly chose short expiration times to simulate multiple stampedes, and observed an overall effect during the 60 second window. Here are the results:

Cold boot

Without debouncer:

Summary:
Count: 887495
Total: 60059.11 ms
Slowest: 6908.89 ms
Fastest: 0.55 ms
Average: 135.10 ms
Requests/sec: 14777.03
Response time histogram:
0.546 [1] |
691.381 [870160] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
1382.216 [7434] |
2073.050 [4404] |
2763.885 [2186] |
3454.720 [209] |
4145.555 [312] |
4836.390 [559] |
5527.225 [1056] |
6218.060 [505] |
6908.895 [669] |
Latency distribution:
10% in 27.40 ms
25% in 57.70 ms
50% in 84.08 ms
75% in 112.40 ms
90% in 170.33 ms
95% in 254.05 ms
99% in 1549.95 ms
Status code distribution:
[OK] 887495 responses

With debouncer:

Summary:
Count: 1156274
Total: 60041.89 ms
Slowest: 1731.10 ms
Fastest: 32.23 ms
Average: 103.68 ms
Requests/sec: 19257.79
Response time histogram:
32.227 [1] |
202.115 [972011] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
372.003 [23286] |∎
541.890 [2702] |
711.778 [0] |
881.665 [0] |
1051.553 [0] |
1221.440 [0] |
1391.328 [43] |
1561.216 [942] |
1731.103 [1015] |
Latency distribution:
10% in 66.05 ms
25% in 77.36 ms
50% in 92.63 ms
75% in 113.26 ms
90% in 147.19 ms
95% in 178.08 ms
99% in 264.65 ms
Status code distribution:
[OK] 1156274 responses

Warmed up

Without debouncer:

Summary:
Count: 1053108
Total: 60769.34 ms
Slowest: 8058.86 ms
Fastest: 0.38 ms
Average: 114.43 ms
Requests/sec: 17329.60
Response time histogram:
0.382 [1] |
806.230 [982042] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
1612.078 [9147] |
2417.926 [5000] |
3223.774 [1944] |
4029.621 [479] |
4835.469 [953] |
5641.317 [371] |
6447.165 [1] |
7253.012 [3] |
8058.860 [59] |
Latency distribution:
10% in 23.74 ms
25% in 48.83 ms
50% in 78.63 ms
75% in 98.37 ms
90% in 122.91 ms
95% in 158.75 ms
99% in 1474.71 ms
Status code distribution:
[OK] 1053108 responses

With debouncer:

Summary:
Count: 1321340
Total: 60064.00 ms
Slowest: 578.69 ms
Fastest: 36.04 ms
Average: 90.77 ms
Requests/sec: 21998.87
Response time histogram:
36.045 [1] |
90.309 [574748] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
144.573 [401937] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
198.838 [16613] |∎
253.102 [705] |
307.367 [0] |
361.631 [0] |
415.896 [78] |
470.160 [2159] |
524.425 [2099] |
578.689 [1660] |
Latency distribution:
10% in 68.67 ms
25% in 76.69 ms
50% in 87.01 ms
75% in 99.63 ms
90% in 112.48 ms
95% in 124.60 ms
99% in 176.08 ms
Status code distribution:
[OK] 1321340 responses

Conclusion

Due to the reduced memory and network loads, we observed an average difference of more than ~4K requests per second. More importantly the p99 latency was reduced from ~1550ms to ~267ms (almost 580% reduction) for cold boot case, and from ~1447ms to ~176ms (almost 822% reduction) for warmed up case.

In order to verify and visually see how many extra calls we were saving over time, we instrumented CoroutineDebouncer code above, and added markers to count the number of times computeIfAbsent invoked the callback vs the total number of calls to the debounce method. We ran our benchmark for 120 seconds with 4000 concurrent requests and a mix of repeated random IDs to simulate real load. The results were encouraging:

Number of time computeIfAbsent applies the function vs total number of calls

We’ve also put together a sample JS implementation that you can use to simulate results yourself. It follows the exact principle described above, you can fork and play around with different parameters.

There can be various approaches to evict Deferred, or having some sort of waiting timeout on debouncer, but the core idea remains the same. For systems running in a cluster, this approach relies on preventing a stampede from one instance, thus minimizing a cluster-wide stampede. In a very large cluster (thousands), we might still experience a stampede, which will require a different solution. So far this approach has worked well for us in production, and helps us deliver good latency numbers.

With high traffic loads on our systems, every improvement matters and contributes to a snappy experience for our customers, merchants, and dashers. Craftsmanship, and attention to detail helps us deliver our next order in a timely manner.


Avoiding cache stampede at DoorDash was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

A Taste of Summer in Chicago

$
0
0

When summer finally arrives in Chicago, you’d be hard-pressed to find reasons to stay inside (icy blasts of A/C notwithstanding). It’s the season when the city comes alive with outdoor festivals, concerts, and all manners of grassy lawns prime for picnicking.

Big Star and Publican Quality Meats, two beloved Windy City restaurants available on DoorDash, feature the kinds of menus made for summer delivery anywhere — deliciously fresh Mexican fare at Big Star, and gorgeous sandwiches and salads from Publican Quality Meats composed from local, seasonal ingredients and housemade charcuterie.

They’re both operated by One Off Hospitality, the group behind some of Chicago’s most exciting restaurants, including Blackbird, avec, and Pacific Standard Time. We met up with One Off’s Kimberly Galban, VP of Operations and Partner, to talk shop at Publican Quality Meat’s airy West Loop location.

Kimberly Galban, VP of Operations and Partner at One Off Hospitality

How did you get your start working with One Off group?

I started as a host at Blackbird in 1999. I was in college just looking for a “job” and a friend’s mother knew one of the partners of Blackbird. I was hired and the rest is history! I fell in love with the staff, the guests, and the industry.

Where does your passion for the restaurant industry come from?

I think what is really cool about being in the restaurant industry is that people come to see you to get satisfaction. Whether it is a celebration or a bad day or they are just hungry, you are put in a position to make people happy. Food touches people in very deep ways and the experience you can make of your time with one can really make a lifetime memory. I don’t know of any other industry where that is possible. Never a dull moment, never the same day.

What is the vision for Publican Quality Meats and the kinds of foods you’re offering?

Publican Quality Meats’ vision is to offer incredible product to our guests, whether that is naturally raised/hormone free meat from our butchers, hand-selected artisanal retail selections, raveable sandwiches/salads/soups, bread made in our bakery from organic wheats and flours, or the charcuterie and sausages made in house.

From the charcuterie to the dry goods, where do the products at PQM originate from?

We stay as local, home-grown and artisanal as possible working with Slagel Family Farm to a small honey grower. We work directly with the farmers and vendors. We do not order from a third-party vendor. We literally will talk with a farmer about a pig that was born and be updated as to how they are doing, what they are eating. It is the most beautiful and whole approach to knowing where your food is coming from.

What’s the best thing to order from Big Star and PBQ for a summer picnic in Millennium Park? Or a tailgate party at Wrigley Field?

For a Big Star summer picnic, I’d order the Big Star Ensalada, chips and guacamole and panza Tacos. For a Big Star Tailgate, tacos al pastor. A PQM summer picnic would feature kale salad, the little gem salad and our turkey sandwich, and for a PQM tailgate, I’d go with the charcuterie and cheese platter and bread from Publican Quality Bread.

How has your partnership with DoorDash changed your business?

We have been able to add another revenue stream outside our four walls. It is great to bring guests what you offer if they do not want to come to you and also market to a new customer base.

How do you translate the experience of visiting Big Star or Publican Quality Meats in person to the delivery experience?

By simply giving them exactly what they would taste in our locations. Making sure the food they would order in our location is the same look, size, price and temperature as if they were dining in.

We know Chicago is famous for deep dish pizza and hot dogs, but what are some little-known culinary gems of Chicago?

Ha ha ha…actually living in Chicago my entire life, I still don’t know how this came about? I rarely eat deep dish pizza and hot dogs, that is now what I think culinarily when I think of Chicago. I think of a migration of all different types of cuisine in Chicago, whether you’re in Little Italy getting pasta, in Vietnam Town getting pho, in Chinatown getting dumplings, or in Pilsen enjoying carnitas. We have so many little gems and I am proud of the diversity and options you can have just right down the block from where you live.

The James Beard Awards recently relocated to Chicago, and it’s host to 22 Michelin-starred restaurants. What do you think the secret to running a successful restaurant in Chicago is?

We feel the key (no secret) to running a successful restaurant is extending genuine hospitality to your staff and guests, serving a great product, and being humble in all your day to day interactions. Ego has no spot in this success.

What’s the biggest food trend in Chicago right now?

Healthy, plant based, clean food.

What are One Off Group’s plans for the coming year, and beyond?

We just opened Big Star Wrigleyville in early April and Pacific Standard Time at the end of April. The remainder of the year we will focus on enjoying our locations and the teams we have. Next year….you will have to wait and see!

DoorDash was saddened to hear about the passing of Blackbird and One Off Hospitality co-founder Rick Diarmit this past June. Our deepest condolences to his family, friends, business partners, and all the guests in Chicago who loved Mr. Diarmit’s immense contributions to the Chicago culinary world.


A Taste of Summer in Chicago was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

Now Dashing in Spokane and Delaware

$
0
0

By Brent Seals, Head of Launch

Today DoorDash is launching in Spokane, Washington and Delaware!

Use SPKDASH for $5 off orders of $15 or more, Vvlid through 9/8

DoorDash is now available in Spokane County across six cities, including: Spokane Valley, Spokane, Post Falls, Liberty Lake, Coeur d’Alene, and Hayden. Customers can order from over 800 restaurants in their area. All deliveries from DoorDash for the next month are just $1.99, with a free delivery for first-time users. Users can also use the code SPKDASH for $5 off orders of $15 or more through September 8, 2018.

And over to the small but mighty state of Delaware…

Use DEDASH for $5 off orders of $15 or more, valid through 9/8

Locals will have access to more than 800 restaurants in Wilmington and Newark. Neighborhoods available on DoorDash include: Barkley, Naamans Manor, Afton, Brandywine, Talleys Corner, Arden, Ardencroft, Windy Bush, Glenside Farms, Carrcroft, Wembly, Gwinhurst, Holly Oak, Fairfax, Lynford, Ashley Heights, Alban Park, Rodney Square, Pennyhill, Bellefonte, Alapocas, Welshire, Carrcroft, Chelsea Estates, Heritage, Wood Mill, Birch Pointe, Brookbend, Melanie, Woodshade, and Monterey Farms Brookside.

Customers can order from their hometown favorites, such as Honeygrow, Masala Kitchen, and Bites & Slice. Don’t forget to use code DEDASH for $5 off orders of $15 or more through September 8, 2018.

The end of summer just got sweeter!


Now Dashing in Spokane and Delaware was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.


Pickup Now Available Via DoorDash

$
0
0

Today we’re excited to introduce DoorDash Pickup, a new product feature enabling customers to order ahead, skip the line, and pick up conveniently with no fees. Customers can order from tens of thousands of DoorDash restaurants nationwide via Pickup without the added delivery expense. Whether you’re looking to grab a quick lunch in between meetings, pick up coffee on your way to work, or snag dinner before heading home, DoorDash now offers this added convenience.

Here’s how it works:

  • Open the DoorDash app and look for the collection of curated Pickup stores on your homepage.
  • You can also easily find the Pickup option on the menu of your favorite eligible restaurant.
  • Check out. There are no fees!
  • Our app will tell you when it’s time to start heading over to the restaurant, so you can arrive in perfect time to skip the line and pick up your meal.

At DoorDash we’re passionate about helping local businesses scale. Forty-four percent of restaurant sales are from meals consumed outside the restaurant, and 75% of those sales are picked up by the customer rather than delivered. Extending our platform to serve take out orders was a natural progression for DoorDash as we strive to provide even more convenience for time-starved, hungry customers and drive incremental revenue for our merchants.

“BJ’s is really excited to be a part of DoorDash’s expansion with Pickup. This new product gives BJ’s loyal guests, who often order delivery through DoorDash, another convenient way to get the great food and handcrafted beer they love from us. Not to mention it will give DoorDash customers an opportunity to discover the amazing variety and quality of BJ’s menu. We look forward to more of their growth, being a part of ours.” — Kevin Mayer, EVP, Chief Marketing Officer of BJ’s Restaurants and Brewhouse
“We have been a partner with DoorDash for many years. We appreciate that they take care of our customers as we would. This new launch of Pickup is another example of that.” — Kimberly Galban, VP of Operations at One Off Hospitality (Chicago, IL)

We’re excited to share this great option with our diners, and will be launching Pickup with exciting giveaways, both local and national, throughout the coming months.


Pickup Now Available Via DoorDash was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

Introducing Unlimited Free Delivery with DashPass Subscription

$
0
0

At DoorDash, we always strive to reward our devoted customers. Whether that means giving you more time back in your day, showcasing new cuisines, or helping you affordably feed your loved ones, we listen to what you like best about DoorDash. And that’s why we’re excited today to announce a new service that will introduce even more convenience and flavor into your lives.

Introducing DashPass — a subscription service that helps you save money by offering unlimited access to hundreds of the best local and national restaurants in your area, with no delivery fees on orders of $15 or more. For just $9.99 per month, you can receive unlimited $0 delivery fees from family favorites like Wendy’s, The Cheesecake Factory, California Pizza Kitchen, White Castle, and many more—just look for the DashPass checkmark. A DashPass membership pays for itself with just three orders per month, and you can cancel anytime, no strings attached.

In our pilot testing, the average DashPass subscriber saved over $20 per month, even after the monthly subscription fee!

Here’s how it works:

  • To sign up, open your DoorDash app and look for the DashPass banner at the top of the home screen.
  • It’s $9.99/month, and you can cancel at any time.
  • Once you’re signed up, look for the checkmark to discover hundreds of restaurants in your neighborhood available on DashPass.
  • Start receiving unlimited deliveries with no delivery fees on orders of $15 or more.

Save those fees for the food, and sign up today. We’re rolling DashPass out over the next few months — if you don’t see it, it’s not available in your area just yet (but keep checking over the next couple of months). Happy feasting!


Introducing Unlimited Free Delivery with DashPass Subscription was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

Scaling StatsD

$
0
0

By Jing Zhao, DevOps Software Engineer at DoorDash

Overview

Monitoring is hugely important, especially for a site like DoorDash that operates 24/7. In modern-day DevOps, monitoring allows us to be responsive to issues and helps us maintain reliable services. At DoorDash, we use StatsD heavily for custom metrics monitoring. In this blog post, we take a deeper look at how DoorDash uses StatsD within its infrastructure.

What is StatsD?

According to The News Stack:

“StatsD is a standard and, by extension, a set of tools that can be used to send, collect, and aggregate custom metrics from any application. Originally, StatsD referred to a daemon written by Etsy in Node.js. Today, the term StatsD refers to both the protocol used in the original daemon, as well as a collection of software and services that implement this protocol.”

According to Etsy’s blog:

StatsD is built to “Measure Anything, Measure Everything”. Instead of TCP, StatsD uses UDP, which provides desirable speed with little overhead as possible.

StatsD at DoorDash

At DoorDash, we use StatsD configured with a Wavefront backend to build a responsive monitoring and alerting system. We feed more than 100k pps (points per second) to Wavefront via StatsD, both from the infrastructure side and the application side. We use StatsD and Wavefront to monitor the traffic throughput of different API domains, RabbitMQ queue lengths, uWSGI and Envoy stats, restaurant delivery volumes and statuses, market health, etc. Wavefront’s powerful query language allows us to easily visualize and debug our time series data. The alerting system is flexible enough to notify us through email, Slack or PagerDuty based on severity. Well-tuned alerts helps us lower MTTD (Mean Time To Detect). We encourage our engineers to customize their own metrics to fully monitor their system’s health and performance.

As a startup company, scalable issues come with high growth rate. Last year, the scalability of our metrics infrastructure was challenged. Our Growth engineering team reported that the volume of our end-user activities was much lower than expected. After cross-referencing our tracking data in other sources, we confirmed that the problem lay within our monitoring system. Solving these scaling issues along the way led us to a more scalable infrastructure.

Monitoring infrastructure evolution

  • One StatsD on one AWS EC2

At the beginning, we had one StatsD process running on an eight core AWS EC2 instance.

Illustration of one StatsD on one AWS EC2

The setup was quick and simple; however, when incidents happened, the load average alert on this EC2 instance never fires even if the StatsD process is overloaded. We didn’t notice the issue until Growth engineering team got paged for false alarms. Even though we have eight cores on the StatsD EC2, the Etsy version of StatsD we are running is single threaded. Thus the overall instance average of the CPU utilization was not enough to trigger the alert. We also spent some time to see how the Linux kernel handles UDP requests and gained some visibility into the server’s capacity. By looking at /proc/net/udp, we can find the current queue size for each socket and whether it was dropping packets.

Example of /proc/net/udp file

In the example above, there are lots of dropped packets and a high rx_queueof 1FBD (8125) at local_address 00000000:1FBD(0.0.0.0:8125) which is listened by StatsD.

Meaning for some of the columns:

  • local_address: Hexadecimal local address of the socket and port number.
  • rx_queue: queue length for incoming UDP datagrams.
  • drops:The number of datagram drops associated with this socket. A non-zero number can indicate the StatsD was overloaded.

More reference can be found here.

  • NGINX as StatsD proxy to distribute traffic

After understanding the problem better, we started to look for solutions. There are already plenty of blogs about how people scale their StatsD, but we also tried to explore other possible ways. For example, we tried to use NGINX as a UDP proxy. We did encounter some issues with the number of UDP connections. If we want to use NGINX, we also need to figure out a way to make consistent hashing for UDP requests so that metrics will always hit the same StatsD, otherwise counters won’t be able to accumulated correctly and gauge will be showing multiple StatsD. Also potentially unbalanced hashing will cause a certain StatsD node to be overloaded. So, we decided to pass the NGINX solution at the moment.

  • Local StatsD

A quick patch we did to mitigate the packet loss issue (due to maxing out a single CPU core) was to setup something we called local StatsD. Basically we installed StatsD on the EC2 instance itself and, in rare cases, inside each application containers. It was an OK short term solution, but it increased our Wavefront cost since metrics were not as well batched as before. Also the higher cardinality made Wavefront time series queries slower.

Illustration of local StatsD
  • StatsD proxy and StatsD on one EC2 host

To reduce the Wavefront cost and increase the performance, we needed to aggregate our metrics before sending to Wavefront. Each StatsD proxy is assigned to different ports on the EC2. Looking at /proc/net/udp we know that it is useful if we can allocate more memory to the recv buffer so that we can hold more data during a traffic surge, assuming the StatsD process can consume the messages fast enough after the surge. There was some tuning we did with Linux kernel. We added the following configuration into /etc/sysctl.conf.

net.core.rmem_max = 2147483647
net.core.rmem_default = 167772160
net.core.wmem_default = 8388608
net.core.wmem_max = 8388608
Illustration of StatsD proxy and StatsD on one EC2 host
  • Sharding by application

Our Dasher dispatch system related applications pump a lot of matrices into Wavefront, which crashed our StatsD Proxy and StatsD EC2 often. So we started to hold three StatsD EC2 instances: dispatch StatsD for the dispatch system, monolith StatsD for our monolith application and global StatsD for all other microservices to share.

Illustration of sharding by application
  • StatsD proxy + StatsD on multiple EC2

The previous solution worked for a while. But with continued growth, the sharded architecture could no longer enough to handle the traffic. And only a limited number of StatsD proxy processes and StatsD processes can run on a single host. We had a lot of dropped packets from the global StatsD server. Instead of putting multiple StatsD proxies and multiple StatsD’s on the same host, we built a tier of StatsD proxies fronting another tier of StatsD processes. In this horizontally scalable architecture, we can add more StatsD proxies and StatsD when there is any dropped data.

Illustration of StatsD proxy + StatsD on multiple EC2

Takeaways

  • Use AWS A record instead of AWS Weighted Round Robin (WRR) CNAME for StatsD proxy DNS records. One behavior we noticed with WRR CNAME setup was that when using the StatsD, multiple servers would resolve the StatsD proxy DNS as the same IP address during the same period of time. This is likely due to how CNAME round robin works in AWS. This will end up with the same StatsD proxy server causing the overload of a specific StatsD proxy. To evenly distribute the workload of the StatsD proxies, we decided to use an old school DNS round robin of multiple A records.
  • Turn on deleteIdleStats for StatsD configuration to handle missing metrics in Wavefront. DeleteIdleStats is an option that doesn’t send values to graphite for inactive counters, sets, gauges, or timers as opposed to sending 0. For gauges, this unsets the gauge (instead of sending the previous value). By turning this on, we can clearly identify “no data” metrics. And according to Wavefront, wrapping the alert condition with a default() function is an effective way of dealing with missing data.
  • Use Elastic IP for StatsD proxy servers, since the client would resolve the StatsD proxy DNS as IP using the StatsD library. Once the client connects to a StatsD proxy and doesn’t try to reconnect to the StatsD proxy, the client would cache the StatsD proxy IP until the process is recycled. If the StatsD proxy servers are relaunched during this period of time, the server will not connect to the right StatsD proxy anymore unless the IP of the StatsD proxy server stayed the same as before. So by using Elastic IP, we can reduce the misconnection between StatsD client and StatsD proxy servers and lower the data loss possibility. And from client side, by configuring max request limit for a WSGI server, it should be able to re-resolve the DNS within an expected time window, which is similar as a TTL and helps to reduce misconnection.
  • Continuous monitoring for StatsD EC2 and StatsD Proxy is imperative to avoid server crashes and mitigate potential disaster, especially when you are running services in the cloud. Some alerts based on the StatsD metrics are really sensitive, so we don’t want engineers to be paged because of missing data. Some of our StatsD metrics are used for our cloud resources’ autoscaling, so missing data will be a disaster.
  • CPU and memory analysis of the StatsD EC2 and StatsD proxy EC2 can help to choose the right size for the EC2 instances, which reduces unnecessary cloud resource cost.

Special thanks to Stephen Chu, Jonathan Shih and Zhaobang Liu for their help in publishing this post.

See something we did wrong or could do better, please let us know! And if you find these problems interesting, come work with us!


Scaling StatsD was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

Now Dashing in Grand Rapids and Wichita

$
0
0

By Brent Seals, Head of Launch

DoorDash is launching in Grand Rapids, Michigan and Wichita, Kansas.

Use DASH2GR for $5 off orders of $15 or more, valid through 9/15

DoorDash is available for delivery from over 500 restaurants across Kent County, in the neighborhoods of: East Paris, East Beltline, Bailey’s Grove, Princeton Estates, Ridgebrook, East Kentwood, Mapleview, Kelloggsville, Home Acres, Godwin Heights, Burton Heights Garfield Park, Alger Heights, Fuller Avenue, Ottawa Hills, Gaslight Village, Breton Center, Ridgemoor, Auburn Hills, MIchigan Oaks, Fulton Heights, Midtown Old East End, Belknap Lookout, North Park, Northview Heights, Northview, West River, Alpine Center, West Grand, Downtown, John Ball Park, Black Hills Urbandale, Dixie, East Grandville, Wedgewood Park, Grandville Lakes, Calvin Crest, Byron Center Park, and Heritage Park.

Residents can order from national restaurants like IHOP along with local favorites like Swanky’s Pizzeria. All deliveries from DoorDash for the next month are just $1.99, with a free delivery for first-time users. Users can also use the code DASH2GR for $5 off orders of $15 or more through September 15, 2018.

And heading south to the birthplace of White Castle…

Use DASHWICHITA for $5 off orders of $15 or more, valid through 9/15

DoorDash is now available to locals from Wichita, Park City, and Bel Aire. With more than 400 restaurants on the platform such as national staples like Buffalo Wild Wings, we’re thrilled to be launching in Wichita so that residents can get even more access to the foods they love, with the convenience of delivery.

Every day of the week from 11am to 10pm, Grand Rapids and Wichita locals can now get their favorite foods delivered straight to their door with DoorDash!


Now Dashing in Grand Rapids and Wichita was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

Accelerating Our Momentum

$
0
0

DoorDash Raises Growth Capital During Breakout Year

By all accounts, 2018 has been a breakout year for DoorDash.

  • We grew 250% YOY — more than tripling our business — to become the fastest growing last mile logistics company in the U.S., according to Edison Trends.
  • Our geographic footprint nearly doubled since January to more than 1,000 cities across the U.S and Canada. We’re on pace to reach 2,000 cities by the end of the year, serving 200 million Americans.
  • Leading the industry in selection, we added more top 100 restaurants to our platform than all other industry players combined, including national favorites like Chipotle, IHOP, Red Lobster and White Castle, while signing exclusively with The Cheesecake Factory last month.
  • Building on the incredible momentum of DoorDash Drive, we announced a national grocery delivery partnership with Walmart that has now expanded to nearly 300 stores in 20 states in the last four months.
  • Last week we debuted the DashPass subscription service and Pickup feature to generate even greater value for our merchant partners, while driving stronger loyalty among our customers with lower prices.
  • Through Project Dash, we saved over 30,000 pounds of food to combat food waste.
  • We grew our talented team by over 250 people in offices across the country, and welcomed key executives, including Chief People Officer, Sarah Wagener and Chief Financial Officer, Prabir Adarkar.

To help us capitalize on this momentum, we are excited to share that we have closed $250 million in a growth round co-led by Coatue Management and DST Global, valuing the company at $4 billion.

As we grow, we will stay true to our values and our mission of connecting people with possibility — and, trust us, we’re just getting started.


Accelerating Our Momentum was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

My Engineering Internship Experience at DoorDash

$
0
0

By Ivy Wang

Intern offsite to Angel Island

Walking into the cafeteria on my first day, I could not help but notice five words written on big colorful boards: humble, thoughtful, bold, optimistic, and relentless. These represented the company’s values and I have to admit the first time I read them, I was confused. Of course, I knew what the words meant individually, but put together they almost seemed contradictory. After all, how could someone be both thoughtful and relentless? Or be both humble and bold? As a software engineering intern on the Dispatch team, I witnessed how people at DoorDash lived these values and how seemingly opposing values could exist in a single organization.

My main project this summer was to train a model to detect high-variance routes for use in assignment decision making which can help prevent bad batching and reduce unnecessary customer waiting time. After a couple of weeks, the performance of my model had still not improved above the baseline. Sensing my frustration, Raghav Ramesh, my mentor, told me that 9 out of 10 experiments we ran turned out to be worse than the current implementation. But while the experiments failed to make it to the product, they succeeded in helping us gain a better understanding of our marketplace and build confidence towards the next experiment that could push our product forward. So I persisted and learned the importance of iterating and “failing” quickly.

Another initiative I worked on was a new internal package to help data scientists train and evaluate models. Yixin Tang, the ML engineer who designed and led this project, recognized the shortcomings of the existing package we used and instead of hacking together a workaround for himself, architected a completely different system that could improve the productivity and flexibility for anyone who trained models at the company. This was quite a daunting task as it required all models (and there are a lot of them) to be migrated to this new pipeline. But when the product was nearing completion and Yixin was complimented on its design, he quickly stated that the credit belonged to all the individuals who gave feedback and contributed throughout the development. This quickness to share credit is a characteristic that I believe stems from the mutual respect each person has for one another. Everyone is incredibly smart but also acutely aware of the strengths of others. This awareness helps everyone, myself included, feel appreciated, learn and grow together.

Humble, thoughtful, bold, optimistic, relentless. These are the values that all DoorDash people possess but certainly each individual is beyond what these 5 words can summarize. I can’t adequately express how grateful I am for having the opportunity to intern at DoorDash and to learn from the amazing people on the Dispatch team. It’s been an amazing summer and I am excited about what’s to come!

A special thanks to my mentor, Richard Hwang, and the Dispatch team for an amazing summer.


My Engineering Internship Experience at DoorDash was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

Now Dashing in 60 New Cities Across the Sunshine State

$
0
0

By Brent Seals, Head of Launch

Today marks the biggest launch day in DoorDash history!

We are now live in 60 new cities in Florida, adding 3000 restaurants to the platform, reaching more than 12 million Floridians. With today’s announcement, we have the largest footprint in the state.

Customers in the area can order DoorDash between the hours of 11 a.m. and 10 p.m. from a wide selection of local and national favorites across the state, including: Alexandria Pizza, Felipe’s Mexican, BJ’s, Chipotle, Denny’s, Five Guys, Jack in the Box, Red Lobster, Wendy’s, and more.

In celebration of our 60-city launch, deliveries for the next month will be $1.99, with a free delivery for first-time users. Florida residents can also use the code FLDASH2018 for $5 off orders of $15 or more through September 27th.

For a full list of cities we are now serving, see below. Enjoy!

  • Auburndale
  • Brent
  • Bunnell
  • Cape Canaveral
  • Cocoa
  • Cocoa Beach
  • Cypress Gardens
  • Daytona Beach
  • Daytona Beach Shores
  • Edgewater
  • Ensley
  • Florida City
  • Ferry Pass
  • Flagler Beach
  • Fort Pierce
  • Gainesville
  • Hialeah
  • Hialeah Gardens
  • Holly Hill
  • Homestead
  • Indialantic
  • Indian Harbour Beach
  • Jan Phyl Village
  • Jensen Beach
  • Lakeland
  • Malabar
  • Medley
  • Melbourne
  • Merritt Island
  • Miami Gardens
  • Miami Lakes
  • Miami Springs
  • Mims
  • Naranja
  • New Smyrna Beach
  • Opa-locka
  • Ormond Beach
  • Palm Bay
  • Palm Shores
  • Pensacola
  • Plant City
  • Ponce Inlet
  • Port Canaveral
  • Port Orange
  • Port Saint John
  • Port St. Lucie
  • Princeton
  • Rockledge
  • Satellite Beach
  • Sewall’s Point
  • South Daytona
  • Stuart
  • Tallahassee
  • Titusville
  • Vero Beach
  • Virginia Gardens
  • Warrington
  • West Melbourne
  • West Pensacola
  • Winter Haven

Now Dashing in 60 New Cities Across the Sunshine State was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.


Dorm-Dash Trend Report

$
0
0

A Look at College Students and their DoorDash Cravings

We’ve always had a special place in our hearts for college students. Our founders met back in Stanford — so college students are in our blood.

As tribute to our founding story, we decided to take a look at what college students are up to these days and how DoorDash has helped them get through study sessions, tailgates, finals week and fun weekends. We compiled our findings into a “Dorm-Dash 2018 College Trend Report” — check it:

College students tip more than non-college students:

According to our data, the average college student tips 16.4%, whereas non-college students only tip 13.5% on average. Perhaps this is because they are still on their parents’ dime?

College students love to eat late night and sleep in the next day:

By hour, college students make up the largest share of all DoorDash orders between the hours of 2–4am. We are eagerly awaiting for an invitation to one of these late night feasts.

But they can’t do it all. We saw that college students also make up the lowest share of orders at 8am — they need their beauty rest, too.

College students try to enjoy mom’s cooking when they can:

College students place the most DoorDash orders while school is in session. From June to August (summer break), their ordering goes down — likely to take advantage of mom’s home-cooked meals (we can’t blame them!).

College students cure their hangovers with delivery:

According to our data, college students order more on Sundays than any other day of the week — hungover, anyone? We’re happy to get them through these those tough times. After all, a burrito is the best hangover cure.

New York is the city that never sleeps, especially for college students:

New York college students order dinner the latest, while Austin students go to bed the earliest. Austin students place the fewest orders at 11pm. Dear Austin students: Let loose a little won’t ya?

Students send other students delivery to help with studying! Here are some examples of instructions given to Dashers:

“Go up the stairs near the parked motorcycle in the driveway. It’s the first door on the right once you get upstairs. Sorry I don’t know the unit #, my boyfriend is studying hard and I don’t want to bother him while he’s working (sending him food so studying is less painful). If you have any questions, call him — his name is Will. I’ll be asleep so I won’t be able to answer any calls.”
“This is a surprise gift for Sarah from Andy. She is studying for a big test on Friday. Thank you!”
“This is a gift :-) a graduation celebration. Please do not ask for their signature or anything to show them the cost. Thank you!”
“Order for Spenser. It is a surprise to help her study for finals.”
“Say, “It’s for Kelly, to make studying easier!””
“Please leave the meal at reception. The order is for Matthew, a Pepperdine Grad taking the Bar Exam.”

And last but not least… the “Top 10s” (because we all know college students love lists):

Top 10 schools:

  1. Stanford (hey hey alma mater!)
  2. Arizona State
  3. Berkeley
  4. University of Colorado
  5. University of Minnesota
  6. University of California, Irvine
  7. University of Southern California
  8. New York University
  9. Michigan University
  10. Boston University

Top 10 items:

  1. Hot Sauce Packets (Hmmm fueling their study sessions with hot sauce packets?!)
  2. Burrito Bowl
  3. French Fries
  4. Beef Taco
  5. Burrito
  6. Chips
  7. Cheeseburger
  8. Soft Drink
  9. Pad Thai
  10. Garlic Naan

Top 10 restaurants:

  1. The Cheesecake Factory
  2. Chipotle
  3. Buffalo Wild Wings
  4. Taco Bell
  5. Wendy’s
  6. Jack in the Box
  7. Chick-fil-A
  8. McDonald’s
  9. P.F. Chang’s
  10. California Pizza Kitchen

Top 10 categories:

  1. American
  2. Burgers
  3. Mexican
  4. Pizza
  5. Dessert
  6. Chinese
  7. Sandwich
  8. Chicken
  9. Breakfast
  10. Thai

Dorm-Dash Trend Report was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

Reinforcement Learning for On-Demand Logistics

$
0
0

By Gary Ren, Richard Hwang, Yixin Tang

Overview

  • Introduction
  • What is the assignment problem at DoorDash?
  • What is reinforcement learning?
  • Reinforcement learned assignment
  • Moving forward
  • Conclusion

Introduction

DoorDash recently held our thirteenth hackathon. Hackathons are our opportunity to explore new technologies and moon-shot ideas; they help us stay up-to-date with the world and think 10x. At DoorDash, we’re constantly thinking of ways to improve the customer experience, from reducing delivery times to increasing Dasher efficiency. Algorithms and artificial intelligence help lay the foundation for delightful customer experiences, and for this hackathon, we wanted to see if more advanced techniques could further improve our product. Our team of six applied an artificial intelligence technique called reinforcement learning to the assignment problem at DoorDash, beating our production algorithm in a simulation environment with both quicker delivery speeds and higher Dasher efficiencies. In this post, we will describe what that means and how we accomplished it.

The hackathon team

What is the assignment problem at DoorDash?

DoorDash provides a real-time platform for fulfilling consumer demand for merchant goods via a flexible Dasher fleet. Within DoorDash, the logistics team focuses on the magic that happens behind the scenes from when a consumer submits an order to when they receive that order at their door, including everything from supply/demand forecasting to automated delivery monitoring. The assignment problem is one specific area within logistics that deals with the following question: which Dasher should fulfill which delivery? We aim to make Dasher-delivery assignments that yield quick delivery speeds and healthy Dasher efficiency, where efficiency is number of deliveries performed by Dasher per unit time. In making these decisions, we need to consider many factors, including but not limited to:

  • Consumer quoted times
  • Estimated order ready times
  • Travel estimations
  • Routing (for multi-delivery assignments)
  • Dasher utilization (percentage of time a Dasher is actively working on a delivery over an entire shift duration)
Figure 1: Assignment problem at DoorDash

The assignment algorithm at DoorDash has been crafted over the years to consider all these factors and more, in order to best serve consumers, merchants, and dashers. However, given the breadth of the assignment problem, and the fact that we don’t have ground truths for what the best assignments are, improvements to the algorithm do not always come easily. When Hackathon XIII rolled around, we wondered, “Could an artificially intelligent assignment algorithm learn to improve itself?”.

What is reinforcement learning?

Reinforcement learning is one of the most popular and powerful artificial intelligence algorithms today. Instances of reinforcement learning have reached mainstream news, such as AlphaGo, the reinforcement learned computer program that defeated the world’s top Go player. In short, the goal of reinforcement learning is to learn the best action given a state of the environment, in order to maximize the overall rewards. Here are the fundamental concepts in reinforcement learning, summarized in Figure 2.

State: The current status of the environment. It represents all the information needed to choose an action.

Action: The set of all possible moves at a state.

Reward: The feedback as a result of the action. Note that rewards can be immediate or delayed.

Policy: The strategy used to choose an action at each state.

Agent: The entity that takes actions and tries to learn the best policy.

Environment: The world that the agent interacts with.

Figure 2: Conceptual overview of reinforcement learning

Here’s an example application to illustrate these concepts. Let’s say we are designing a delivery robot and teaching it to pick up delivery items while avoiding pedestrians. In this case the robot is an agent trying to learn the optimal policy, i.e. optimal action in each state. The states can be the area that robot is operating in, with the items and pedestrians at various locations, and the actions can be move left, right, forward, or backward. The robot receives a positive reward when it picks up an item, a negative reward when it runs into a pedestrian, and no reward otherwise. With these settings the robot can learn the optimal policy to pick up all the items in a way that maximizes the reward.

The goal of reinforcement learning is to find the optimal policy. This is not trivial since unlike Markov Decision Processes, the rewards and transition probabilities between states are unknown, as seen in Figure 3. For this reason, there are many techniques to either obtain this information (model-based) or obtain the optimal policy directly (model-free), such as Monte Carlo, Bootstrap, and SARSA. The most commonly used is Q-learning, which is a model-free, off-policy method that can directly give us an estimate of the Q function to find the optimal policy.

Figure 3: Markov Decision Process with Unknown Transition Matrix Pij

It is worth mentioning that to use Q-learning, we need to collect data by following an exploration policy. When we are more concerned with learning about the world than maximizing utility, we can choose a no-exploitation, all-exploration policy, which explores the action space by always choosing a random action. When we care more about utility, we need to balance exploration and exploitation, so that we can reap the benefits of what we’ve learned while still not being blind to opportunities that we haven’t yet encountered. One common approach in the second case is the epsilon-greedy algorithm, which explores with probability epsilon and exploits with probability 1-epsilon.

In practice, when there are a large number of states, the state space is featurized and function approximation is used to determine the Q function. This makes the Q function a model instead of a lookup table. Oftentimes, handcrafting features is difficult, so deep learning models like fully connected or convolutional neural networks are used to represent the Q function. This approach is known as Deep Q-Network (DQN) and is very useful when feature dimensionality is high and data volume is also high.

Reinforcement learned assignment

Now we will discuss how we applied reinforcement learning to the DoorDash assignment problem. To formulate the assignment problem in a way that’s suitable for reinforcement learning, we made the following definitions.

State: The outstanding deliveries and working Dashers, since they represent the current status of the world from an assignment perspective. Note that this means that the state space is practically infinite, since deliveries and Dashers individually can have many different characteristics (pick up location/time, drop off location/time, etc.) and there can be many different combinations of deliveries and Dashers.

Action: The most natural choice is the assignment of Dashers to deliveries. However, even with just 15 deliveries and 15 Dashers, the total number of combinations exceeds one trillion! Therefore, to significantly reduce the action space, we defined the actions to be different variants of the assignment algorithm with different parameters. This can be thought of as intelligent parameter tuning where the model learns which parameters are best for a given state of deliveries and Dashers.

Reward: Combination of delivery speeds and Dasher efficiency. We want deliveries to reach customers as quickly as possible while utilizing Dashers as efficiently as possible. This translates to minimizing delivery speeds and maximizing Dasher efficiency. The reward also includes a penalty for undelivered deliveries, to ensure that all the deliveries are actually assigned to Dashers and delivered to consumers.

With these concepts defined to fit reinforcement learning, we now needed to implement the two key components to actually perform reinforcement learning, the environment and the agent.

Environment: We need a system that can output states (deliveries and Dashers) and rewards (delivery speeds and Dasher efficiencies), as well as take in actions (variants of assignment algorithm) and subsequently update the states and rewards. Our production assignment system fits the bill, but we run the risk of hurting our actual deliveries and customers, since the agent might choose bad actions as it learns via an exploration policy. Fortunately, we already have a simulator for our assignment system that can take in an assignment algorithm and produce simulated assignments that mirror our production system. This assignment simulator is used for obtaining offline results before trying online experiments for the assignment system. Therefore, we used this simulator as our environment, allowing us to train our reinforcement learning model on states/actions/rewards that are accurate to our production system without impacting our customers.

Agent: We chose a deep neural network as the agent, since it makes sense to use a model for the Q function and featurize the states into high dimensional vectors, given our infinite state space. More details about this featurization and model will be covered in the next section.

A high level summary of our problem formulation can be found in Figure 4. In summary, the assignment simulator outputs the state, which the agent uses to choose a variant of the assignment algorithm. The assignment simulator runs the chosen algorithm and outputs the new state and the reward, which are both passed back to the agent. This cycle repeats at a preset time interval.

Figure 4: Reinforcement learning applied to the assignment problem

For the actual implementation, we wrapped the DoorDash assignment simulator into an OpenAI Gym environment and used Keras RL for the agent and training, as the two libraries are compatible out-of-the-box.

Deep agent

As previously mentioned, we used a deep neural network as our agent. Recall that the agent maps state and action pairs to rewards. Concretely, the network takes as input the state (represented as different features) and predicts the Q-value for each action, as seen in Figure 5.

Figure 5: Neural network as Q(s, a) approximators

For our problem, the features generated from the states are intended to capture the information about deliveries and Dashers that are useful for predicting the Q-value, which are future delivery speeds and Dasher efficiencies. Some examples of these features are the pick-up to drop-off distances, the ratio of deliveries to Dashers, and the estimated order ready times.

The model itself is a multi layer dense/fully-connected network. A few different model parameters were tried, but more thorough hyperparameter tuning and architecture exploration will be done in future work.

This model is trained using the deep Q-learning algorithm as presented by Mnih et al. in their Deep Reinforcement Learning paper. Details can be found in the paper, but the general idea is that the environment and agent are used to generate states, actions, and rewards that are stored as experiences. These experiences are then drawn from to create training samples, which the model uses to optimize towards the maximum Q-value.

Results

Evaluation was done by making assignments for one day of data in one region. We first obtained baseline results by running the assignment simulator with the default production assignment algorithm and obtaining the average delivery speeds and Dasher efficiencies.

Then to evaluate if our model did any better, we had our model pick the best assignment algorithm to use for each state over that same day and obtained the new average delivery speeds and Dasher efficiencies. These results show that the reinforcement learned model achieved on average a 6 second improvement in delivery speed and 1.5 second improvement in Dasher efficiency across all deliveries. This does not seem like much, but when millions of deliveries are involved, these seconds quickly add up. These results prove that reinforcement learning can help with the assignment problem.

Moving forward

We made some progress during the hackathon, but there is always more to do. Here are some ways we would like to improve the agent:

  • More hyperparameter tuning, e.g. learning rate, hidden layer sizes.
  • Adding more features, i.e. generating more features from the states.
  • Structuring features in the form of a 3D grid by placing deliveries/Dashers in the grid based on latitude and longitude. The analogy is an image, which has a height, width, and depth. We can then try convolutional neural networks, which are popular for image based tasks, as the agent.

Conclusion

We have seen how applying reinforcement learning to the assignment problem at DoorDash has yielded an enhanced assignment algorithm. We believe reinforcement learning is a powerful tool that we can use to improve our on-demand logistics platform, and we are excited at the opportunity to further delight our customers using advanced artificial intelligence.

We would love to hear about your production applications of reinforcement learning. If solving these types of problems excites you, come join the team!

Acknowledgments

Thank you to the entire hackathon team for working on this project: Anne Zhou, Gary Ren, Ivy Wang, Richard Hwang, Sifeng Lin, Yixin Tang. And thank you hackathon committee for organizing another fun hackathon!


Reinforcement Learning for On-Demand Logistics was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

Join us in delivering good this Hunger Action Month

$
0
0

Over 72 billion pounds of food go to waste each year. At the same time, one in eight people in the U.S. faces hunger. At DoorDash, it’s our mission to change that.

Last month, we asked our customers why they support Project DASH, our initiative connecting surplus food from restaurants to local nonprofits.

September is Hunger Action Month. How can you join in?

Volunteer or give to your local food bank.

Over half of all food programs rely entirely on volunteers. At the SF-Marin Food Bank, where DoorDash employees contributed their time on September 4th, volunteers provide work equivalent to 70 full-time employees each year.

We were reminded of how impressively networked the fight against hunger is, something you might never see unless you visit. Food banks, often large warehouses like the SF-Marin Food Bank in SF’s Dogpatch neighborhood, play a critical role as a receiving and storage place for millions of pounds of donated wholesome produce and shelf-stable food. This food is sorted and distributed to a network of nonprofits like food pantries, soup kitchens, shelters, and other community organizations that provide food directly to low-income people. The 200 food banks in Feeding America’s® network and their associated 60,000 food pantries coordinate 4.3 billion meals each year.

How you can help:

  • Find your local food bank. Donate time, food, or money.
  • Volunteer. Bring a group!
  • Organize a canned food drive. For even more impact, raise money for your local food bank. Each dollar donated to a food bank helps provide multiple meals to people in need.
  • Contact your elected officials and tell them to support anti-hunger efforts.

Get informed about hunger in your community.

Nutrition is a basic human need and mealtime is one of the most culturally significant moments in our day. Hunger touches so many aspects of our society. Chronic health problems result from a lack of adequate nutrition. Hunger is closely linked with poverty and disproportionately affects ethnic minorities and rural communities. Kids that go to school hungry can struggle to keep up — and one-third of people facing hunger in America are children.

On the flip side of the same coin is the problem of food waste. Over 1/5th of landfill volume is food waste. Globally, 5.4 million square miles of land is used to produce food that no one eats. The food we have isn’t getting to those who need it most. By raising awareness of hunger and the systemic factors that drive it, we can work towards the goals of making our cities more livable and our society healthier.

How you can learn more:

Project DASH since launching this January

Join us in Delivering Good.

With Project DASH, we’re working with partners like Feeding America to provide the logistical means for restaurants and businesses to donate food directly to hunger relief organizations.

To continue supporting the work of these organizations across the country, we’re donating one meal through Feeding America for every new subscription to DashPass this month.* The Cheesecake Factory and Grand Lux Cafe have joined us in delivering good: for every order in September on DoorDash, they’re donating a meal to match.*

Nominate your local food bank!

Email projectdash@doordash.com with the subject line “Food Bank Nomination” by September 30, 2018 and nominate your local food bank for the chance to receive a $1,000 donation from DoorDash.

The food bank must be a Feeding America member found on this list: www.feedingamerica.org/find-your-local-foodbank. Tell us which food bank you would like to nominate and how you’ve seen or experienced the positive impact your local food bank has in your community. Be sure to include your name and phone number. Two recipients will be selected based on how well the submission demonstrates impact on a specific community. If yours is one of the selected submissions, you’ll also get $100 in DoorDash credit. See full rules here.

________________

*Leveraging Feeding America’s ability to source and transport donated food at scale, every $1 donated helps provide 10 meals for families facing hunger through its network of food banks. See full DashPass meal donation terms here, and full Cheesecake Factory and Grand Lux Cafe meal donation terms here.


Join us in delivering good this Hunger Action Month was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

Protecting our community

$
0
0

DoorDash is committed to the security of our community and combating fraudulent activity on our platform. We have been notified by a small subset of DoorDash users (a fraction of one percent) that unauthorized orders may have been placed on their accounts.

Our fraud detection and security teams are monitoring this situation closely and are continuing to investigate. Based on our initial investigation, we believe that DoorDash consumer accounts were accessed via credential stuffing. This type of fraud occurs when passwords acquired from previous data incidents affecting other companies are used to login to accounts on our platform. We have implemented a variety of fraud detection capabilities, and we will continue to take measures to enhance the security of our platform.

While our investigation continues, as a precautionary measure, we encourage users to reset their passwords by clicking here. If you need help resetting your password, please contact DoorDash Support at password-assistance@doordash.com.


Protecting our community was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

Now Dashing in Charleston

$
0
0

By Brent Seals, Head of Launch

Today, DoorDash is launching in historic Charleston, South Carolina in addition to six surrounding cities.

Use promo code CHSDASH for $5 off orders of $15 or more, valid through Nov 17, 2018.

DoorDash will be available for delivery in the Charleston metro area alongside Goose Creek, Hanahan, West Ashley, James Island, and Mt. Pleasant. Neighborhoods include Lincolnville, Wood Oak Park, Ashley Forest, Westoe, Avenue of Oaks, Wildwood, Drum Island and Whitehall Terrace.

Charleston residents can order from national restaurants like Red Lobster, Applebee’s and Wendy’s and can enjoy $1 Deliveries for all orders over $15 for the first month.

Enjoy!


Now Dashing in Charleston was originally published in DoorDash on Medium, where people are continuing the conversation by highlighting and responding to this story.

Viewing all 711 articles
Browse latest View live