Skip to main content

One post tagged with "throttling"

View All Tags

· 9 min read
Fatih Baltaci

Introduction

Django Rest Framework Throttling with API Key Preview Image

In this article, we will write an endpoint using the Django REST framework with API Key throttling (rate limiting). We will first use Django default cache configuration Local Memory Caching for throttling and we will see that this method does not work for multiple workers on gunicorn or multiple replicas on Kubernetes. We will change the Django cache configuration to Redis to solve this problem. We will test throttling with the open-source load testing tool Ddosify.