Hello there,

First of all,  a big thanks for bringing out a product like syncgateway 
which will simplify and eliminate the need for custom webservices I have 
been writing past couple of years to achieve the same!

I have been playing around quite a bit on the various use cases and have a 
question based on a note I saw in the documentation regarding SyncGateway.
See note below.

Managing TCP Connections¶ 
<http://docs.couchbase.com/sync-gateway/#managing-tcp-connections>

Very large-scale deployments might run into challenges managing large 
numbers of simultaneous open TCP connections. The replication protocol uses 
a “hanging-GET” technique to enable the server to push change 
notifications. This means that an active client running a continuous pull 
replication always has an open TCP connection on the server. This is 
similar to other applications that use server-push, also known as “Comet” 
techniques, as well as protocols like XMPP and IMAP.

These sockets remain idle most of the time (unless documents are being 
modified at a very high rate), so the actual data traffic is low—the issue 
is just managing that many sockets. This is commonly known as the “C10k 
Problem <http://en.wikipedia.org/wiki/C10k_problem>” and it’s been pretty 
well analyzed in the last few years. Because Go uses asynchronous I/O, it’s 
capable of listening on large numbers of sockets provided that you make 
sure the OS is tuned accordingly and you’ve got enough network interfaces 
to provide a sufficiently large namespace of TCP port numbers per node.

----------------------------------------------------------------------------------------

Now lets say I have a cluster of sync gateways and have a F5 loadbalancer 
up in front of the sync gateways.
The way I understand is that each of my iOS mobile app clients will have an 
open socket connection to my F5 listening to change notifications.

A few questions on this - 

   - Does this socket get established as soon as i call pull() from the iOS 
   client?
   - And the socket stays open foreever from that time onwards?  
   - What happens to the socket when the app is minimized or in the 
   background?
   - What kind of factors do i need to consider at the F5 level to be able 
   to scale appropriately?
   - And finally, is there a way to indicate at the client side to not keep 
   the connection open permanently?  Any drawbacks of this?  I have a shared 
   loadbalancer and dont want to hog on all available sockets!
   

Thanks a lot in advance and let me know if you need more background on my 
questions.
-D


-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/8b50f98c-7bf8-4c9d-a1a9-31c6309d9da9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to