In addition to this, the established connection count to db is increasing on every new API hit. Ideally existing connection should be reused.
Moreover even if we restart Cassandra the connection from the API end do not get killed and remains the same. On Thu, 12 Jan, 2023, 02:16 Elliott Sims, <elli...@backblaze.com> wrote: > Consistently 200ms, during the back-and-forth negotiation rather than the > handshake? That sounds suspiciously like Nagle interacting with Delayed > ACK. > > On Wed, Jan 11, 2023 at 8:41 AM MyWorld <timeplus.1...@gmail.com> wrote: > >> Hi all, >> We are facing a connection latency of 200ms between API server and db >> server during connection. >> We are working with Apache cassandra 4.0.7 and open jdk ver 11.0.17. We >> are using php on API side and connecting using php Cassandra driver (CPP >> ver 2.7) with below string. >> $cluster = Cassandra::cluster() >> ->withContactPoints('x.x.x.x') >> ->withPort(9042) >> ->withCredentials("user", "pswd") >> ->withPersistentSessions(true) >> ->withDefaultConsistency(Cassandra::CONSISTENCY_LOCAL_QUORUM) >> ->withDatacenterAwareRoundRobinLoadBalancingPolicy("dc1",0, false) >> ->build(); >> $dbh = $cluster->connect('mykeyspace'); >> >> We have earlier worked in 3.11.6 version and things were working fine. >> This is the first time we have installed ver 4.0.x and started facing this >> issue.No change have been done on driver side. >> Just note both API and db server are on same location and ping time to db >> server is less than 1ms. >> >> Unable to identify the root cause of this. Does anyone have any clue? >> >> Regards, >> Ashish >> >> > This email, including its contents and any attachment(s), may contain > confidential and/or proprietary information and is solely for the review > and use of the intended recipient(s). If you have received this email in > error, please notify the sender and permanently delete this email, its > content, and any attachment(s). Any disclosure, copying, or taking of any > action in reliance on an email received in error is strictly prohibited. >