Fastapi(Async), Redis(Aysnc), Nginx(Load Balancer) 을 통해 Bookstore에 관한 CRUD Rest-API를 구현.
nginx를 통해 load balance기능을 추가 시키고, redis를 통해 캐싱을 할 수 있게 하는 백엔드 구조를 구현.
security는 Oauth2.0을 적용(jwt-token)을 통해 구축하고, https을 구현.
locust를 통해 load testing을 진행함.
insomnia라는 툴을 이용해 api test를 진행함
redis는 비동기처리를 위해 aioredis를 사용함
digital ocean(클라우드)에서 서버 3개를 띄운 다음에 load testing 및 deploy을 진행함
├── Dockerfile
├── README.md
├── app
│ ├── models
│ │ ├── author.py
│ │ ├── book.py
│ │ ├── jwt_user.py
│ │ └── user.py
│ ├── routes
│ │ ├── v1.py
│ │ └── v2.py
│ ├── run.py
│ ├── tests
│ │ ├── ab_jsons
│ │ │ └── post_user.json
│ │ ├── all_tests.py
│ │ └── locust_load_test.py
│ └── utils
│ ├── config.py
│ ├── db.py
│ ├── db_functions.py
│ ├── db_object.py
│ ├── helper_functions.py
│ ├── redis_object.py
│ └── security.py
├── deploy.sh
├── nginx-https
│ ├── Dockerfile
│ ├── bookstore.nginx
│ ├── certbot.sh
│ ├── entrypoint.sh
│ ├── nginx.conf
│ └── ssl-options
│ ├── options-nginx-ssl.conf
│ └── ssl-dhparams.pem
├── nginx-reverse-proxy
│ ├── Dockerfile
│ ├── bookstore.nginx
│ └── nginx.conf
├── requirements.txt
./deploy.sh
- fastapi의 auto documentation(swagger)기능을 통해 api documentation작성 (http://127.0.0.1:8000/docs)
- insomnia라는 postman과 비슷한 api test툴을 이용하여 api test를 진행함
- locust라는 툴을 사용하여 load testing을 진행함
- digital ocean(클라우드) 에 bookstore api서버 3개와 database 서버 1개를 띄워서 deploy를 진행함