matthiasmullie / scrapbook

PHP cache library, with adapters for e.g. Memcached, Redis, Couchbase, APC(u), SQL and additional capabilities (e.g. transactions, stampede protection) built on top.
https://www.scrapbook.cash
MIT License
315 stars 27 forks source link

Bottleneck in Couchbase Adapter #35

Closed pesha closed 1 year ago

pesha commented 6 years ago

We have uncovered issue with logic that is assessing cluster health. This check is performed using regular http call which can lead to significant performance issues (higher response time). We didn't identified the root cause exactly but it can be caused by reaching of some limit (TCP connections).

https://github.com/matthiasmullie/scrapbook/blob/044ff954e41579ff922ee3341b1695d12bb04840/src/Adapters/Couchbase.php#L38

The graph below shows the impact on response time before and after the method assertServerHealhy was commented out. response time

pesha commented 6 years ago

It might not be needed to solve that anymore as we had slightly older version. The current version in m aster has an option using which we can disable this check. I would just consider whether the check shouldn't be disabled by default.