Hi, I’m trying to replace Memcache with Couchbase as our caching layer.
I have Flask web API with connecting to cache and datastore.
Specific details are following:
- 3 Instances of Flask API running with uwsgi (6 processes, 2 threads)
- Persistent Connection to a clustered datastore.
- A cluster of 3 Couchbase server (Each: 4 vCPU, RAM 8 GB)
So far I have tried using connection pool and class instances for Couchbase.
Both method perform similarly in term of performance.
Load testing using Tsung via our API results in Client-side timeout when connecting to Couchbase. This mostly happen because I have quite large upsert_multi payload (which I utilize heavily when using Memcache; Can be up to 800 keys per call).
I performed loadtest with 3 arrival phase (10, 50, 100 per second), which simply make the request to our API.
The API then cache data using 3 separate steps for each user request.
- Cache list of ids. Using request filter, etc (upsert).
- Cache metadata. Using request filter, etc (upsert).
- Cache multiple documents using id as its key (upsert_multi).
With Memcache, we could serve at least 1K requests per instances. With Couchbase we are seeing lots of timeout reported.
What am I missing here?