All posts
Engineering
Cached analytics for AIESEC: from 20 seconds to under 200ms
Michael Kevin Victor · · 3 min read
We just launched cached analytics for AIESEC!
AIESEC’s global platform supports thousands of members and API automations, handling ~150 analytics requests per minute and managing over 15 million data points.
Previously, each analytics query hit our Elasticsearch cluster directly — often taking 20 to 90 seconds to return results. Needless to say, this impacted user experience.
What we did
We introduced 24-hour query caching for analytics:
- When a user makes a request, we cache both the parameters and the results.
- If the same request is repeated within 24 hours, we serve it instantly from the cache.
- Requests including “today’s” date always bypass the cache for live data.
- Users are shown a timestamp, so they know when the data was last refreshed and when live data will be available.
The result
- Avg. query time dropped from 20s to under 200ms
- Massive UX improvement and increased trust in the platform
- Load on Elasticsearch significantly reduced
Next up: Cost optimization by downsizing our Elasticsearch cluster.