<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by ema on Medium]]></title>
        <description><![CDATA[Stories by ema on Medium]]></description>
        <link>https://medium.com/@ema3000?source=rss-32e150b4cb3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tlRe6mmEOwthlzphGlOj2w.jpeg</url>
            <title>Stories by ema on Medium</title>
            <link>https://medium.com/@ema3000?source=rss-32e150b4cb3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 00:40:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ema3000/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to survive on-call in 4 steps]]></title>
            <link>https://medium.com/glovo-engineering/how-to-survive-on-call-in-4-steps-259361f4d1d8?source=rss-32e150b4cb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/259361f4d1d8</guid>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[on-call]]></category>
            <category><![CDATA[engineering-culture]]></category>
            <category><![CDATA[incident-management]]></category>
            <dc:creator><![CDATA[ema]]></dc:creator>
            <pubDate>Mon, 30 Oct 2023 09:17:14 GMT</pubDate>
            <atom:updated>2023-10-30T09:17:14.096Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*Qsbs1jCkT52QXGft" /></figure><h3>Intro</h3><p>Many tech companies have adopted the concept of “on-call”, meaning being ready to provide support in case their service is not working as expected.</p><p>But while there are well-established best practices for the monitoring/observability and incident response platforms, I think we need to focus more on the preparation and the semantics of Incident Response.</p><p>So in this article, you can find 4 very personal tips derived from my on-call experience that I hope could be useful to share!</p><h3>Breathe</h3><p><strong>First things first: Put things in perspective</strong></p><p>This depends on the domain, but in the majority of tech companies, the incident that popped up on your phone and is making your heart race is not going to put someone’s life at risk, so the first thing to do is to remind yourself that <strong>you’re not a surgeon</strong>, nobody is going to die but it’s “just” about money.</p><p>I found that thinking about this and taking a couple of deep breaths before starting to look into what happened helps reduce anxiety and be more focused, rational and effective in handling the problem.</p><p>Finally, remember also that your <strong>goal now is to mitigate, not investigate and fix it for good</strong>, so:</p><ul><li>Rollback is better than pushing a hotfix</li><li>If you suspect a specific feature could be the cause, don’t hesitate to disable it to check!</li><li>The next working day is the right time to investigate deeper</li></ul><p>If you forget this and just take your time to dive deep during an incident it’s:</p><ul><li>Bad for you ➡️ personal time lost</li><li>Bad for other on-call persons who joined to help you ➡️ time lost</li><li>Bad for the company ➡️ pay you extra to work overtime</li></ul><h3>Be prepared</h3><p>The biggest work of incident resolution can be done BEFORE the incident. Here are 4 things to include in your team practices:</p><h4>Build (and maintain) an on-call handbook</h4><p>Have a shared team handbook for on-call</p><ul><li>Need to be the index, the source of truth of incident management</li><li>Need to be useful ➡️ links to the dashboard, links to logs, toggles, …</li><li>Need to be SHORT, FAST ➡️ you won’t have time to read</li><li>Need to be shared and maintained by the team</li></ul><h4>Write SOPs</h4><p>Every time you solve a problem that:</p><ul><li>Require you some work, like coding a script or crafting an API request</li><li>Is not extremely specific, so could be useful again</li></ul><p>It’s time to create a Standard Operating Procedure!</p><p>This basically means the next time that during an incident there is a situation, before jumping into crafting a solution you take a look and find an SOP, then just follow the steps.</p><p><strong>Example</strong>: An event consumer stopped working due to a bug and some critical events got lost. To solve the issues, the on-call engineers will probably do something like:</p><ul><li>Move the offset of the consumer group, if messages are still in the broker</li><li>Force the sender to resend the messages</li><li>Manually sync data reading from the sender DB</li></ul><p>Even though the problem was different, it happened another time that this service was out-of-sync, so you find an SOP and just follow the steps: after a few minutes, the problem is fixed.</p><p>These tasks are not straightforward and could even make the situation worse, plus it is much harder to think straight with anxiety, maybe after being woken up in the middle of your sleep. Imagine how easier it would be to find a step-by-step guide at that moment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/0*91SwGmQW98jUxRrn" /></figure><p>To Recap: <strong>common problems have common solutions</strong></p><ul><li>Hard to think straight during an incident</li><li>Can immensely reduce mitigation time</li><li>Do your homework (the day after, not during the incident)</li></ul><h4>Roleplaying</h4><p>Take time to train (especially new joiners) on realistic scenarios!</p><p>An experienced engineer who has already managed many incidents can raise a fake incident, and then pretend to be a RTO agent that can provide details on the problem. The trainees will then need to go through logs, metrics and apply resolutions, while the expert engineer “shadows” them.</p><p>If you ever played D&amp;D, this is what I am talking about, I found this teaching technique to be crazily more effective than any others.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*Onpn5pO-equuO6kP" /></figure><h4>Prioritize OPS tickets</h4><p>This point is mainly for engineering managers or lead engineers: you need to make sure that critical ops tickets get prioritized or they will never be done.</p><p>By this, I don’t mean forcefully push them in the sprint, but have a conversation with your PM/Business team and kindly explain to them why this is important and what are the business implications of NOT doing it.</p><p>If you explained it correctly, I am sure that they will be the first willing to push them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/0*a6e2ia7qwtNXHz--" /></figure><h3>Team Power</h3><p>This point seems very straightforward, and yet I’ve seen so many times people not doing it!</p><p><strong>Call for help</strong>: the on-call engineers are a team, don’t try to solve the problem on your own if another service is involved, e.g. if there’s an infrastructure problem and you’re not an SRE: don’t wait! Call one!</p><p>The mitigation time can be hugely reduced and they are on-call, so you should be expected to be called <strong>not only for a problem on your specific service</strong> but for anything in the company you could be helpful solving.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*8Vadfeaw6ANV3zSc" /></figure><p>Of course the same will apply to you, so <strong>help others if you want to be helped</strong>, join on-calls of others and actively help until it’s solved.</p><h4>About guilt</h4><p>It’s very important to set a blame-free culture in your company, not only because it’s the right thing but also because it’s more effective: people will have less anxiety and will focus more on the learnings of an error rather than the blaming.</p><p>Also, even if it was you who wrote a bug that is destroying prod, <strong>it should not be that easy to compromise a company’s service</strong>, there should be processes put in place by engineering leaders like code reviews, automatic rollbacks, automatic migrations checks, … everything that is commonly defined as “Guardrails” (ref The Staff Engineer’s Path — Tanya Reilly).</p><h3>If everything else failed</h3><p>A couple of suggestions to be put in your handbook, for when you encounter a difficult problem not easy to debug:</p><ul><li>Check recent deployments (<strong>not only of your service</strong>)</li><li>Check recent feature toggle changes (<strong>not only of your service</strong>)</li><li>Try to focus on a specific case, even if millions of orders/users have errors, <strong>focus on one</strong> and deeply debug it</li><li>Call for help: call other teams, call all your team, call your manager</li><li>Talk more with RTO agents:<br>- Ask for more cases or if they can spot some pattern in the problem<br>- Consider a manual solution, sometimes it’s faster than coding a script<br>- Ask them for possible mitigation like closing the service or sending a message to the customers, you’re less prone to customer churn if you’re honest and declare that you have a problem and working on it</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*G7VCsdo1NBTd-B8_" /></figure><h3>Recap</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/291/1*KsPqPfoiFnbmP4Nm-EpqHQ.png" /></figure><h4>DON’T</h4><ul><li>Try to fix the problem for good.</li><li>Hesitate to call other teams.</li><li>Blame or fear to be blamed, every incident is everyone’s fault.</li><li>Even if you wrote a bug, it should not be that easy to compromise a company’s service.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*7xeGRW5g95iyy_PTnFCxAQ.png" /></figure><h4>DO</h4><ul><li>Do your homework: Handbook, SOPs, Prioritize Ops tickets, Training.</li><li>Go for the fastest way to mitigate.</li><li>Call for help, even if it’s your ownership.</li><li>Talk and coordinate with the RTO.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=259361f4d1d8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/glovo-engineering/how-to-survive-on-call-in-4-steps-259361f4d1d8">How to survive on-call in 4 steps</a> was originally published in <a href="https://medium.com/glovo-engineering">The Glovo Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inside Glovo’s deliveries optimization]]></title>
            <link>https://medium.com/glovo-engineering/inside-glovos-deliveries-optimization-7609f3f86586?source=rss-32e150b4cb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/7609f3f86586</guid>
            <category><![CDATA[matching]]></category>
            <category><![CDATA[optimisation]]></category>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[delivery]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[ema]]></dc:creator>
            <pubDate>Fri, 10 Mar 2023 11:17:24 GMT</pubDate>
            <atom:updated>2023-03-10T11:17:24.544Z</atom:updated>
            <content:encoded><![CDATA[<h3>Intro</h3><p>In the instant-delivery business, efficiency is everything: a large volume of orders with relatively small delivery fees is sustainable only if the system is able to leverage the scale reducing the cost sustained by the company for each individual order.</p><p>That’s why in <strong>Glovo</strong> we invested a lot of resources dealing with optimization, and today I’d like to show you how the <strong>Matching</strong> team combined software and math to boost efficiency in our company.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/0*4DodSBR3s4u4rAIo" /></figure><p>The main goal of the team is to solve the assignment problem, which consists in deciding, for each order, who is the best courier to handle it, with the goal of improving the efficiency of the system while respecting the business constraints, where with “business constraints” we mean any kind of rule that needs to be followed by the assignment logic: for example, an order that needs to be delivered in a limited traffic area can’t be assigned to a courier that is driving a car.</p><h4><strong>Bonus: what is efficiency?</strong></h4><p>In our context, “efficiency” is strictly linked to the time the courier has to wait at the pickup point, let’s try to explain it with a simple example from our domain:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9tnnVnOMtVHIkOoP" /><figcaption>Figure A</figcaption></figure><p>In Figure A we have 2 couriers: courier 1 with a scooter and courier 2 with a bike, and 3 orders: a pizza, a taco and sushi. The first courier is already handling the pizza and we need to decide who to assign the others. We estimate the preparation time (ETP in the figure) for tacos as 10 minutes, and for sushi as 3 minutes.</p><p>A naive approach would be to <strong>assign the closest free courier to any order</strong>, so now we imagine we went on with this simple approach and looking back after orders were delivered, you can see in Figure B what happened.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cQHlDBNHien65EI5" /><figcaption>Figure B: a naive assignment</figcaption></figure><p>You can see here the travel time of the couriers, how much they waited at the store and the total time from the customer&#39;s point of view.</p><p>The main problem here is that courier 2 is <strong>too close</strong> and will need to wait a lot while the restaurant is preparing the taco! To make things worse, the taco delivery point is far from a bike, so the total time for the customer would be 25 minutes, while for the sushi one will be 16.</p><p>But if we try the approach of <strong>minimizing the waiting time</strong>, see in Figure C what happened this time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*p2nEpVadGD_YIxGw" /><figcaption>Figure C: an efficient assignment</figcaption></figure><p>The final situation looks much better, no courier had to wait and all the orders actually arrived faster!</p><p>But the most careful of you will have noticed a little drawback: the tacos were ready before courier 1 arrived, and they “waited” 1 minute more. In this case, this is not a real problem since it’s compensated by the scooter’s higher speed in the delivery phase, but we have to take into account this and many other “constraints”, while at the same time dealing with way more orders and couriers.</p><p>In order to solve the assignment problem, there are already a lot of algorithms (some of the ones we used: <a href="https://en.wikipedia.org/wiki/Hungarian_algorithm">Hungarian algorithm</a>, <a href="https://en.wikipedia.org/wiki/Minimum-cost_flow_problem#:~:text=The%20minimum%2Dcost%20flow%20problem,flow%20through%20a%20flow%20network.">Minimum cost flow</a> and <a href="https://en.wikipedia.org/wiki/Integer_programming">Mixed Integer Problem</a>). Still, for every specific domain you need to build a cost function representing the metrics you want to optimize and tune it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/0*8F8yBkdtFTYkKbFn" /><figcaption>Figure D: assignment matrix of the example</figcaption></figure><p>Now I’d like to continue talking about how we added a new dimension to this optimization, considering not only the best possible assignments but also the best ways to combine orders together: something that strongly depends on the real-time conditions of a city. We’ll explore the problem first and then see an overview of our software architecture.</p><h3>The p̶r̶o̶b̶l̶e̶m̶ idea</h3><p>Once upon a time, there was <strong>Bundling</strong>, a simple intuitive idea and yet, the biggest efficiency booster we still know.</p><p>Bundling, in the original definition, simply consists in offering a courier to take <strong>2 orders prepared in the same place</strong>.</p><p>As always, implementing the idea is trickier than it seems. It’s not enough to consider orders with close delivery locations, but also ensure we respect all the business constraints, like:</p><ul><li>the maximum overall distance assignable to a courier</li><li>food getting cold due to the extra waiting time</li><li>meeting the promised delivery deadline</li><li>…</li></ul><p>Finally, we needed to do everything efficiently and on a big scale.</p><p>That worked out pretty well and thus, shortly after that, we wanted more: the same concept, but also <strong>from different pickup points</strong> (figure 1)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5Fnw0_Qd23Qg1Zty" /><figcaption>Figure 1: S=Start, P=Pickup, D=Delivery</figcaption></figure><p>Again, a simple idea but very tough to implement, especially because the number of possible combinations “exploded”.</p><p>Finally, we developed yet another kind of bundle: <strong>any number of orders</strong> a.k.a. the <strong>Multibundle</strong>.</p><p>Again, what seems an obvious idea hides the great complexity of efficiently and effectively solving the <a href="https://en.wikipedia.org/wiki/Vehicle_routing_problem"><strong>V</strong>ehicle <strong>R</strong>outing <strong>P</strong>roblem</a> (VRP from now on) at scale. We had two main problems: the load and the ambiguity:</p><p><strong>The (computational) load</strong>: we are committed to providing assignment decisions for every city at most every 10 seconds, but the VRP it’s an NP-hard problem and thus can be really time-consuming, so it’s hard to be executed in such a short time.</p><p><strong>The ambiguity</strong>: we didn’t want to deprecate the old bundling algorithm, because it could potentially find better bundles in some cases, but this means that now we may find the same order in more than one “potential” bundle, so we need to pick one!</p><p>Let’s try to picture it with an example, in Figure 2 you can see on the left a bunch of orders: those orders can be then processed by the bundling algorithms we mentioned (and even more, since the same algorithm can be run with different parameters) and each one will produce a list of bundles.</p><p>Let’s also add the “default option” which simply consists in not creating a bundle, just delivering the order “alone”.</p><p>Finally, let’s also introduce the concept of transport constraint, since a bundle could become too heavy for certain vehicles or one of the orders could need to be delivered in a restricted traffic area. As an example <em>{(O1,O2,O3), CAR}</em> means that it is combining the first 3 orders but this bundle can only be assigned to a courier with a CAR.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*npSpuOzJSe5om18u" /><figcaption>Figure 2</figcaption></figure><p>Now you can see that we can’t simply pick them all, in fact, if we take, say, the first Bundle of the first two algorithms: <em>{(O1,O2,O3), CAR}</em> and <em>{(O1,O2,O4), CAR}</em> we would have a conflict.</p><p>Choosing the best bundles is not an easy task, even simplifying the problem by assuming we only want to minimize the total delivery time while meeting the promised deadlines, is it better to pick <em>{(O1,O2,O3)}</em> and <em>{(O4)}</em> alone, or <em>{(O1,O2)}</em> and <em>{(O3,O4)}</em>?</p><p>There is no obvious answer… for example, you may think that O3 will be delivered first by choosing the second option, but what if our estimations say that O4 will take a lot to prepare? <strong>bundling them together would mean that the courier will need to wait for both orders to be ready</strong>… on the other hand, what if O2’s delivery location is very far from O3’s? Maybe in this case, the first solution is better only if we assign it to a CAR. We should also consider <strong>how many couriers and which vehicles are active right now in the area</strong>, what the promised deadlines that we need to meet, the chances of food getting cold and many other factors; so the best option here is to extend our optimization model to consider all the constraints and select the best non-conflicting Bundles.</p><p>[We are working on another article from our data scientists to dive deeper into the optimization problem, but here we’ll focus on the engineering part and thus we’ll continue by showing the software architecture]</p><h3>The technical solution — Architecture</h3><p>Let’s get to the software architecture part, we know the problem we want to solve, now let’s add some data:</p><ul><li>We publish ~20 million order assignment decisions per month.</li><li>All our calculations are based on estimations, like the two we saw in the introduction: time to prepare an order, and time required to travel. That’s why we ask our estimation services for ~5 billion estimations each month</li><li>We are expected to not delay the order assignment for more than 10 seconds with our processing, so we work with a time window of 10 seconds in each city.</li><li>The assignment matrix (free couriers against Order/Bundle to be assigned) can grow up to 1k*2k resulting in ~2M of potential combinations to consider in each time window (every 10 seconds).</li></ul><p>Let’s refer to Figure 3 for a high-level overview of the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jqA51KQBHa1YePfg" /><figcaption>Figure 3</figcaption></figure><p>The service is consuming a lot of events from the rest of the Glovo ecosystem to maintain the state of all the orders and couriers in the world. It is not exposed to the public internet but can be accessed from a back-office web app, the Admin panel.</p><p>It is deployed through multiple instances that are handled by a load balancer that can scale up during peak times, and scale down to save energy. Finally, it saves and publishes assignment decisions that are consumed by services in the Glovo ecosystem.</p><p>It depends explicitly only on the estimator services to calculate the cost function of each assignment, which will be used in the optimization engine, but of course, it also depends on all the order and courier events it consumes (but not specifically from the services that are publishing them).</p><p>It requires a relational database to store the state of the “world” (mainly active orders and couriers) and the decisions taken by previous cycles. However, the overall data volume can be kept small due to low retention requirements.</p><p>A Redis cluster is also essential to act as a caching system and to leverage the geo-indexing capabilities to greatly reduce the combination of orders to consider.</p><p>Now that we saw the high-level components, let’s dive deeper into what we can find in every instance of the service (Figure 4).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-q_s89HeYL5falyV" /><figcaption>Figure 4</figcaption></figure><p>Subscribers and API are pretty obvious components with little business logic, then we have:</p><h4><strong>Bundle Generator(s)</strong></h4><p>A bundle generator’s goal is to combine orders in a smart way to create Bundles.</p><p>As already mentioned, there are different implementations of this, so you can see the bundle generator as a composition of many single implementations with a common interface; where these implementations are loosely coupled with the rest of the system: they can be added or removed without changing anything else. The Multibundling is just one of these, the latest and most complex we implemented.</p><p>For the multibundling, we have a dedicated scheduler that continuously checks cities that need bundles, the <a href="https://redis.com/glossary/redlock/">locking mechanism is based on Redlock</a>, and when the lock is acquired, an execution is scheduled with a timeout equal to the lock’s one.</p><p>In execution, the multibundling generator will:</p><ol><li>load all the orders’ data of the city from a read replica, to avoid putting pressure on the main node;</li><li>run the VRP algorithm with all the constraints applied to calculate the best combinations of orders into bundles;</li><li>save the bundles in Redis temporary storage, <strong>eventually overriding </strong>the previous execution of the same city.</li></ol><p>As the VRP algorithm is very CPU-demanding and we don’t have the same strict requirements as the optimizer, we relaxed the time window to 1 minute.</p><h4><strong>The Optimizer</strong></h4><p>The optimizer is the real core of the system, whose goal is to publish assignment decisions.</p><p>A scheduler continuously checks cities that need assignments, acquires a lock with timeout through the RDS DB (select * for update …) and schedules an “assignment cycle”.</p><p>In each cycle, it:</p><ol><li>Loads the status of the city;</li><li>Loads <strong>and validates</strong> the bundles proposed by the generators (validation is required as the bundle generation happens concurrently and based on the asynchronous read replica, so it could be out of date);</li><li>Create the “matrix” of assignments (orders VS couriers available) checking all the eligibility constraints;</li><li>Loads (or asks, if there aren’t) all the required estimations;</li><li>Calculates the cost function for every eligible assignment;</li><li>Translate the problems into a standard optimization formulation (<a href="https://en.wikipedia.org/wiki/Minimum-cost_flow_problem#:~:text=The%20minimum%2Dcost%20flow%20problem,flow%20through%20a%20flow%20network.">Minimum cost flow</a> or <a href="https://en.wikipedia.org/wiki/Integer_programming">Mixed Integer Problem</a>);</li><li>Solve it, and translate it back to the service domain;</li><li>Apply custom domain logic, like manual assignment requests;</li><li>Save and publish decisions: This step involves the commitment of the Bundle chosen, the rest of the Glovo ecosystem will then know that this Bundle has been created (can still be modified in the future);</li></ol><h3>Conclusion: the hard reality</h3><p>The assignment problem in a delivery platform is core to the efficiency and thus sustainability of the whole service.</p><p>The complexity to handle is huge, and needs to be tackled at a big scale and fast, so the system needs to be designed accordingly with a combined effort of engineers and data experts.</p><p>In this article, we wanted to give you an overall idea of how we are dealing with this at Glovo, but of course, the reality is always more complex, to mention some of the requirements we avoided to simplify:</p><ul><li>some stores may have dedicated couriers to them, they may be able to use both the dedicated ones and the others or even share the dedicated ones with the nearby stores, all depending on the specific store configuration;</li><li>the constraints mentioned on the eligibility of a courier to a particular Order are just a small subset of the real ones;</li><li>We have to deal with many different types of orders, food and non-food, with potentially different optimisation requirements (for example: “getting cold” is a food-only constraint);</li><li>the estimations can’t be always accurate, and so there are features in place, like hot-swapping of the order, to compensate for that;</li><li>a courier is free to reassign any order, so the same order can be considered in the optimization cycles many times, not just once;</li><li>a decision taken too early is likely suboptimal, estimations are trying to “predict the future” and the closer the future, the more accurate they are, so <strong>we always try to postpone as much as possible every decision</strong>;</li><li>Our system makes decisions, <strong>but there’s no guarantee that they’ll be applied to reality</strong>: a millisecond after a decision is taken, the courier’s phone may run out of battery, a bike tire can break or the customer could cancel the order… we have to keep following the “actual” status of the world and keep trying to make decisions to chase efficiency;</li></ul><p>I hope this overview of our daily world was interesting for you, looking forward to hearing your comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7609f3f86586" width="1" height="1" alt=""><hr><p><a href="https://medium.com/glovo-engineering/inside-glovos-deliveries-optimization-7609f3f86586">Inside Glovo’s deliveries optimization</a> was originally published in <a href="https://medium.com/glovo-engineering">The Glovo Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>