It seems like sync Gateway creating more than 300 session from a single IP (App) and we have a rule to block on juniper firewall whenever there is more than 300 sessions from a single IP then block traffic for denial of service attack protection.
I would like to know how can find out how many session is it creating and limiting session based on each source IP on sync gateway so that app would not crash because of firewall blocking them when they reach 300 limit.
Hi, we don’t have any way as far as I know to get all the sessions created by the sync gateway. We do however accept pull requests https://github.com/couchbase/sync_gateway
You could probably create a small proxy in between to get the information you need.
How is your firewall defining a session - as an active HTTP connection? I wouldn’t expect that Couchbase Lite would need anywhere near that many active connections at once.
Yes, active connection passed to load balancer but somehow it happened more than 30 times and no idea to track those session and data trying to get as i could not see IP address in sync gateway log.
Is there anyway i can record IP address in sync gateway logs?
We don’t yet have a way to record IP addresses in the Sync Gateway logs - we’re tracking that as a future enhancement (https://github.com/couchbase/sync_gateway/issues/939).
However, HTTP requests are logged by username - can you get enough information from username to identify multiple requests from the same client?
Thanks Adam. I will inform when it happens next time as i do not have logs when this thing happened.