# High x-kong-proxy-latency

**URL:** <https://discuss.konghq.com/t/high-x-kong-proxy-latency/2747>\
**Category:** Questions\
**Created:** [February 3, 2019, 11:37am UTC](https://discuss.konghq.com/t/high-x-kong-proxy-latency/2747 "2019-02-03T11:37:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmeylan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/nmeylan/32/570_2.png) [@nmeylan](https://discuss.konghq.com/u/nmeylan)\
**Post date:** [February 3, 2019, 11:37am UTC](https://discuss.konghq.com/t/high-x-kong-proxy-latency/2747/1 "2019-02-03T11:37:04Z")

</div>

Hello,

I have the following configuration: 1 kong node connected to a cassandra cluster with 3 nodes.

I have an issue with my kong environment: I have figured out that the first request on kong had always a very high x-kong-proxy-latency (5~7 seconds). I have always thought it was normal due to some startup caching mechanism.

However, the latency issue comes regularly, after investigations I found out that it was when db\_cache\_ttl had expired that request had a high x-kong-proxy-latency.

Indeed, I’ve done the following test: When DB\_CACHE\_TTL is at 3600, during 1hour I don’t get any request with high x-kong-proxy-latency.  
Then when I set DB\_CACHE\_TTL at 60, after 1 minute, I get a request with a high x-kong-proxy-latency.

Is there an issue with kong accessing to cassandra? I don’t have any plugin doing any calls to cassandra during request, could it be a cassandra client issue?

I’ve found this topic [Small % of transactions have massive latency spike](https://discuss.konghq.com/t/small-of-transactions-have-massive-latency-spike/1278) but putting DB\_CACHE\_TTL at 0 is clearly not a solution

EDIT: after upgrading from 1.0.0 to 1.0.3 the latency has been reduced (from 7sec to 2)

---

<div class="post-metadata">

**Author:** ![thibaultcha](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/thibaultcha/32/340_2.png) [@thibaultcha](https://discuss.konghq.com/u/thibaultcha)\
**Post date:** [February 4, 2019, 1:03am UTC](https://discuss.konghq.com/t/high-x-kong-proxy-latency/2747/2 "2019-02-04T01:03:11Z")

</div>

Hi,

We now recommend setting `db_cache_ttl` to `0`, since 0.14 lord (see changelog). The cache will not expire and you will avoid runtime cache misses and rebuilds.
