title: Objective C: Increase speed of REST calls on iPhone
body: <p>I am using AFNetworking 2.0 to do HTTP REST calls. For our application, it is crucial that the POST requests be as fast as possible. </p>
  
  <p>After some testing, I observed that the REST POST takes around 5-6 seconds to succeed. If I make the POSTs occur at an interval of 2 seconds or so, this lag can be reduced to 3-4 seconds. Is this because the connection is kept open? There was another stackoverflow answer saying iOS closes the TCP connection after 3 seconds. </p>
  
  <p>On the simulator, REST calls are completed much quicker. If the POSTS occur at an interval of 2 seconds, it takes only 1 second or less to succeed.</p>
  
  <p>My question is: what are some strategies I can use to reduce the lag when REST calls are done on the iPhone?</p>
  
  <p>Thanks in advance!</p>
  
  <p>Edit: The server is a raspberry pi, and all tests are done using a good WiFi connection.</p>