Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Some thoughts: - Storing API keys in Redis with AOF and RDB persistence turned on is going to be way faster than storing those keys in Mongo. - Did you mean RQ (redis-queue)/django-rq? If so, it works well as long as you don't need a scheduler for cron-like tasks, which it doesn't include. You can add rq-scheduler for that though: https://github.com/rq/rq-scheduler - Make sure your redis instance has a password -- redis 6 supports ACLs as well - The problem with slow requests is that they tie up app server processes and usually also database connections. That may be fine with a small number of consumers, but if you point your web site at this API, you may run into problems. Consider that if an app server serving web site traffic is waiting for a slow request to your API, then both app servers are affected -- you're now holding resources on the web site and the API, effectively. - HTTP clients often use a default timeout value for requests, and it's a best practice to use such a timeout -- so you'll need to coach your partners consuming this API not to use timeouts for your API.
You can see what a production setup for supervisord looks like in this app I made for work: https://github.com/redislabs-training/redis-sitesearch/blob/master/supervisord.conf
Side note -- are these processes (Django app, mongo, etc.) running on the same server? If that's the case then something like supervisord can help you organize the processes you want to start and keep them running: http://supervisord.org/
Related posts
- Need direction on how to add asynchronous / scheduled tasks on my flask app running on aws beanstalk
- Wondering if I should use Celery vs threads for what I want to do
- Grant Kubernetes Pods Access to AWS Services Using OpenID Connect
- Set up an Automation script with Ansible
- Interesting Uses of Ansible's ternary filter