Comments (1)
Hello @amankumarjain,
That's actually a really nice question that I tried to solve some times ago. My conclusion was:
- Using celery is not really a solution (at least for me as we are using SQS as a queue system) because response time of the DB ~= response time of SQS. So not a solution
- Async python3 could be a way to do it, for I don't remember which reason, we could consider this solution so I don't know
- "Send a request to add data and do not wait for the answer" was our best solution. What it means is you do your call to what ever system is saving your data but you don't wait the answer or there is no answer. By doing that you avoid every latency or service unavailable disruption. The bad point of this solution is that you could potentially lose data, or at least, not register them and don't know about it.
Actually the solution we went for, with a nice scaling possibility, is the Elasticsearch integration. We have an ES cluster hosted on Elastic cloud and we are sending our data directly to ES. An improvement to do is the 3rd point that I told you before, to send without waiting for the answer.
So I don't think there is an easy or awesome solution but there is definitively things to try. Aside all the possibilities, I think that DRF is trying to keep the impact on the API very low. If I'm not mistaken, our tests are checking that we don't take more than 20ms to log something (which is not perfect but it's ok-ish)
from drf-tracking.
Related Issues (20)
- Log Construction HOT 1
- LogginMixin not gets called with ModelViewSet in Django 2.0.4 HOT 3
- Migrations conflict HOT 4
- When I get an api and there will always be 2 logs at a time HOT 1
- django 2 compatible HOT 3
- Can we track django-oauth-toolkit client?
- Failed Clean data when uploading file as form-data HOT 2
- Only last params value is captured if multiple query params are sent with same key
- why this line is needed? HOT 4
- UnicodeDecodeError on python 2.7 / django 1.11 HOT 2
- Feature Request: Skip logging the response HOT 1
- PIP (pypi) is not updated HOT 5
- Add city & country data to the log HOT 1
- Some requests are not recorded HOT 2
- requested_at and remote_addr fields in base_model are not null HOT 1
- Fix missing query_params on Put/Post/Patch requests. Update tox tests to include django 2.2.6 and drf 3.10.3 versions HOT 5
- Can we publish a new release? HOT 14
- Azure proxy config throws psycopg2 exception HOT 6
- Django version 3.x has not "django.utils.six" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drf-tracking.