title: How to reduce latency of data sent through a REST api
body: <p>I have an application which obtains data in JSON format from one of our other servers. The problem I am facing is, there is is significant delay when when requesting for this information. Since a lot of data is passed (approx 1000 records per request where each record is pretty huge) is there a way that compression would help reducing the speed. If so which compression scheme would you recommend.</p>
  
  <p>I read on another <a href="https://stackoverflow.com/questions/395505/compression-algorithm-for-json-encoded-packets">thread</a> that they pattern of data also matters a lot on they type of compression that needs to be used. The pattern of data is consistent and resembles the following</p>
  
  <pre><code> :desc=&gt;some_description
   :url=&gt;some_url
   :content=&gt;some_content
   :score=&gt;some_score
   :more_attributes=&gt;more_data
  </code></pre>
  
  <p>Can someone recommend a solution to how I could reduce this delay. They delay is approx 6-8 seconds. I'm  using Ruby on Rails to develop this application and the server providing the data uses Python for the most part.</p>