Pergunta de entrevista da empresa Atlassian

Atlassian wants to build a simple scheduling system that can execute one-off HTTP requests at a specified time. Consumers are internal Atlassian services only, and they may use this system to schedule requests to be executed in the future. For example: A consumer can schedule a request to https://testservice.com/api/items/_create to be executed on upcoming Sunday at 1am. So on upcoming Sunday at 1am the scheduling system must execute the HTTP request. Requirements: - Provide an interface for scheduling HTTP requests at a specified time. - Execute an HTTP request at specified time. - Initial release expects 10 scheduling requests per minute.

Resposta da entrevista

Sigiloso

15 de set. de 2022

Got the same question, for the system design portion My answer was basically: SQL db: user table, jobs table cache in front of db multiple application servers load balancer in front a task runner service that ticks every 60 seconds to find jobs select * from jobs where startDateTime <= now () and completed = false and attempts = null The runner service will put jobs into a queue (kafka like) and then serverless fxns will consume jobs from the queue. Any failures would be put in a failed queue, and then we can do some special things like alert the user of a failed job, and then process the failures at a higher priority. aka, pop them into the front of the queue of jobs to complete. The big bottleneck would be the sql query to find the next tick of jobs. So I said, get rid of SQL entirely since such a simple system doesnt need any relational topography and just use a giant horizontally scalable key value store (redis, cassandra, even mongo) instead of the jobs table.

4