A progressive Node.js framework for building efficient and scalable server-side applications.
A Microservices Backend Nestjs MVC app for events & ticket reservation, allow user to authenticate and reserve any number of tickets. The app was heavily focused on ensuring it is a production reliable reservation app meaning it can handle concurrency, heavy requests loads and handling race conditions using mongoose optimistic concurrency and rabbitmq.
The app was load tested to handle over 5k requests making sure ticket reservation is optimized and race conditions wont errupt meaning thousand users can reserve tickets without read/write database confilict operations, using mongoose optimistic concurrency & transactions & rabbitmq.
I always wanted to build a microservices backend app that can handle a common issues in real world usecases and that is race conditions. lets say there is a taylor swift event with only 50 tickets left and server received 100 requests with each request have atleast one ticket for reservation, how can we handle this issue?? using database transactions, locking, database isolation level and Rabbitmq VERY CAREFULLY! we can eliminate this issue.
- Nestjs
- Handlebars
- Mongodb
- Stripe
- Nodemailer
- RabbitMQ
- Docker
- Kubernetes
- Google Cloud
Make sure to have docker installed with rabbitmq image & mongodb atlas instance
$ npm install
## Running the app
Make sure to replace env variables like MONGO_URI with your mongoatlas uri config, stripe & nodemailer smtp secret.
```bash
# docker-compose up
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed.