Skip to content

Al3xDo/optimize_exercise

Repository files navigation

Employee Flask API

This is my API optimize pagination

The base code I used from https://github.com/mtnbarreto/flask-base-api
The data I used from https://github.com/datacharmer/test_db

Contents

Optimize API performance

  • Redis cache
  • Create Index
  • Use last_id to paginate instead of OFFSET and LIMIT
  • Nginx and Gunicorn

Comparision

With Redis Cache

second call

Without Redis Cache

second call

Paginate by last_id

Paginate by OFFSET and LIMIT (SQLAlchemy paginate library)

Without Nginx, Gunicorn

With Nginx, Gunicorn

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published