Skip to content

Instantly share code, notes, and snippets.

@umegaya
Created February 8, 2013 03:31
Show Gist options
  • Save umegaya/4736387 to your computer and use it in GitHub Desktop.
Save umegaya/4736387 to your computer and use it in GitHub Desktop.
how we can get along with timeout?

how can we handle timeout

timeout : head-ache error in network programing

  • what's happening?
  • remote peer crushes
  • network conjested
  • network become unavailable
  • bug

ideas

  • close connection and retry from handshake.
  • just retry

close connection?

  • connection from mobile device, is frequently lost
  • maybe ~5 minutes connection lost
  • its better to show dialog and re-connect user's timing? (eg. when get off metro)
  • or auto reconnection (like GMail's)?

just retry

  • connection in datacenter, is seldome lost.
  • timeout means remote crush (or server become too heavy)
  • just retry operation also causes some problem.
  • also need to close connection and find another server (failover)?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment