Optimizing our API Server built with Django

Written by Stanley Semilla | Published at 06 June 2018

We're currently developing a product that will handle millions of data. We expect our users to be eager to manage their data as fast as they can. They would want to do things simultaneously, and without delay.

Our main stack is composed of Django and React. We chose django-rest-framework to handle most of our API features. We were so happy about using this package until one day we found our API server working very slow. At first, I thought the cause of this performance issue is Django's ORM. So upon looking for solutions, I've seen a lot of articles telling developers to benchmark or profile their software properly. I looked for third-party applications for Django, hoping that we can get a one-off solution for all profiling that we need. We tried the top 3 most popular third-party apps, and didn't find anything that suit our need.

Hopping from one article to the other, I stumbled upon a tutorial that teaches how to make a simple profiler for your Django application. Happily, we found the best solution -- to create our own simple profiler.

My main goal is to get time period for the processes that we expect our users to use more. *... (to be continued) *

Share this post Twitter or Facebook