Here is my task. Every second backgrounder task should generate json based on some data. This operation is not cpu intensive ( mostly network) and it generates JSON content (5-10KB). Operations take about 200ms.
Also I have about 1000 clients asking for this content once every few seconds. Let's say it's about 200 requests/sec.
Server should just output current actual json.
Currently i already have rails 4+nginx+passenger+debian sever doing other jobs, related to this work.
Being a student I want to make my server in a most cost-effective way having an ability to easy-scale in this ways:
- Adding few more backgrounder jobs, generating more json's
- Increasing number of requests to 10 000 per second
Currently I have linode 2048 ssd with 2 CPU Cores. My questions are:
- What gem/solution should I use for my backgrounder tasks ( the are currently written in ruby )
- How to effectivly store actual json and pass it from backgrounder(s) to rails/nginx.
- How to make serving json as fast as possible.