Estimations:
Read heavy due to checking of which jobs need to be run - need to have plan to scale (listed in High Level Design portion)
Also a lot of write throughput - need to have plan to scale (listed in High Level Design portion)
Core Entities:
JobMetaData
POST:
/Task/Upload
{
TaskName,
TaskTime,
Task
}
Main table is JobMetaData table -> Postgres for the relational rows -> Will partition by time intervals to avoid overwhelming a single DB
Async Leader - Follower replication set up with quorum
Retries:
Job runner checks for jobs that are available with lets say 10 seconds buffering time -> places job on the priority Queue
-> If fails, updates DB with retry count and increase priority of current job
User uploads task -> Tries to store script in S3 -> If succesful, generate S3 location URL -> Create entry in JobMetaData
Dispatcher service to constantly query partitions and enqueue onto kafka topic depending on priority (low,med,high topics) and each time it fails itll put it on higher priority queue
Consumer nodes consume off of queue and execute job