A microservices demo built with Celery and FastAPI.
Features:
- launch all with one
docker-compose up
- services run in isolated docker container
- submit tasks with RESTful API (FastAPI)
- separated task queues
- concurrence control
- tasks monitor
Launch the demo:
docker-compose up
Check the page:
- FastAPI page: http://127.0.0.1:8081/docs
- tasks monitor page (powered by flower): http://127.0.0.1:5555
Note: please change IP address and ports accordingly, they are specified in docker-compose.yaml
Try the demo:
- Request
add
ormultiply
services in the FastAPI page and see the interaction process from the log (terminal window of launchingdocker-compose
). - Request
check
api withtask_id
to see the status and the result of the request. - Check the monitor page to see all submitted tasks.