Tech IndustrySep 14, 2022
CyberArkusernamehe

Karat- deliveroo system questions

Can someone suggest answers to these 3 questions: These are from deliveroo - KARAT (round 1) 1. We have an application for creating subtitles out of videos. For this process, a thread is created and it is processor intensive. We found that having 10 threads in the system crashes the system. How do we solve it? 2. You're working on infrastructure for internet-connected vending machines. The plan is to install around 100,000 of these vending machines in the coming year, in major cities around the world. These machines will connect to the internet through cellular devices. Each machine will connect to a central server at midnight to report status, such as stock remaining and any maintenance issues like coin jams or stuck items. These machine status updates will be stored in a database, and a batch job will run at 1 AM to schedule the restocking and maintenance of machines. Are there any problems with the above design? 3. We are running a simple photo storage and sharing service. People upload their photos to our servers, and then give links to other users who can then view them. We're trying to figure out how to split the photos and associated data evenly onto multiple machines, especially as we get new users. We've decided to shard the photos evenly alphabetically by username. For example, if we had 26 servers, all the usernames starting with a would be on server 1, usernames starting with b would be on server 2, and so on. We have created a scheme like this that will work for any number of servers. Are there any problems with this design?

VMware GreekCode Nov 2, 2022

This was asked in production issues or system internals?

Delivery Hero sgcu10 Dec 14, 2022

What's the answer for vending machine question?

Delivery Hero sgcu10 Dec 14, 2022

Photo service design is not distributing photos uniformly across all servers as many names can start with only few alphabets. It would be better to shard based on photo id. We can divide photo id by number of servers and the remainder will represent the server to store that photo.