Each Read Request = 500Bytes
Each Write Request = 1KB
With 5000 concurrent request per seconds
15.768 Billions Request Per year
15.768 GB of data for request processing
Data per Ticket = 10KB
Data Per Account = 2MB
On Average 1 customer processes 3 tickets/day
We estimate our initial deployment with 5000 users
15000 tickets processed per day, (150000KB/day)
On a yearly basis representing up to 547 500 000 KB/Year
with 5000 user profile totaling 10000MB/day
or 3650000MB /year
Total Data Required AROUND 50GB
Post /SignUp
POST /Login
Post /SignOut
Get /Account&account_id=
DELETE /account&account_id =
Get /Movies
Get /Movies/ID/Details
Get /Movies/ID/Seats
Get /Event
Get /Event/ID/Details
Get /Event/ID/Seats
Get /Theater&Zipcode=
Get /Theater/Movies
Post /booking&Event_ID=
Post /cancel&Event_ID=
Post /refund&booking_ID=
Post /new_movie
Post /new_event
Post /Movies/List
Post /Support/ID=
GET /notifications/user_id
POST /movie/user_id/notify
Get /analytics
Defining the system data model early on will clarify how data will flow among different components of the system. Also you could draw an ER diagram using the diagramming tool to enhance your design...
You should identify enough components that are needed to solve the actual problem from end to end. Also remember to draw a block diagram using the diagramming tool to augment your design. If you are unfamiliar with the tool, you can simply describe your design to the chat bot and ask it to generate a starter diagram for you to modify...
Let’s say a user wants to book a ticket for an event via a web or mobile client.
Choice:
We placed an API Gateway in front of a Load Balancer to control, route, and throttle traffic before it reaches microservices.
Pros:
Trade-off:
Choice:
Used Redis/Memcached as a distributed cache in Event Service and Search Service to serve frequently accessed data.
Pros:
Trade-off:
Choice:
We introduced queues (e.g., Kafka/RabbitMQ) for event ingestion and payment retries.
Pros:
Trade-off:
Choice:
Used Elasticsearch (or OpenSearch) for Search Service to enable fast, ranked, and fuzzy search queries.
Pros:
Trade-off:
Choice:
Split API responsibilities into Read (Ap1) and Write (Ap2) APIs.
Pros:
Trade-off:
| ComponentBottleneck ExampleResolution Strategy | ||
| Event DB | Write contention on same event_id | Partitioning / DB queueing |
| Notification | Rate limits on email/SMS APIs | Use queues + batch notifications |
| Payment Service | Synchronous dependency on Payment Gateway | Move to async with status callbacks |
| Feed/Search | Sudden traffic from trending events | Auto-scale replicas + cache hot results |
available_seats.