At MailerLite we store millions and millions of subscribers for our users. This challenge involves designing and implementing a scalable endpoint to handle these subscribers efficiently.
Before running this project, ensure that you have the following prerequisites installed on your system:
- Docker: A platform for developing, shipping, and running applications inside isolated environments called containers. Install
- Docker Compose: A tool for defining and running multi-container Docker applications. Install
Ensure that both Docker and Docker Compose are installed and properly set up on your machine before proceeding.
To run this project, just do: docker-compose up
on the root folder of this project.
It will download all the necessary docker images and will spin up the required backend infrastructure (database, application, cache, network, frontend ...).
It's ready when the following message is presented:
redis | * Ready to accept connections
mailerlite-b | [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
mysql | [Note] mysqld: ready for connections.
...
-
Backend API is available through:
- GET 127.0.0.1:8080/api/subscribers
- GET 127.0.0.1:8080/api/subscribers/{email}
- POST 127.0.0.1:8080/api/subscribers
-
Frontend web app is available through 127.0.0.1:8085