nurfitra@system : ~/projects $ cat omni-chat-optimization.md
omni-chat-optimization.md
rw-r--r--
Omni-Chat Performance Optimization
Reduced system latency by 1600% and optimized data retention from 3TB to 500GB for a large-scale omnichannel chat application.
Ruby on Rails PostgreSQL Redis Elasticsearch
Omni-Chat Performance Optimization
As a Backend Engineer at Qontak by Mekari, I was tasked with improving the performance and reliability of the core Omni-Chat application, which handles millions of messages across various channels like Instagram and Tokopedia.
Key Achievements
- Latency Reduction: Reduced service and worker latency by 1600% (from 8 minutes to 2 seconds, and 30 minutes to 10 minutes) by eliminating N+1 queries on the database and Elasticsearch using bulk requests, and leveraging Redis pipelines.
- Reporting Dashboard: Improved the reporting services dashboard average latencies from 4 minutes to 0.8 seconds, significantly reducing database loads during peak end-of-week and end-of-month periods.
- Data Retention: Paired with a senior engineer to implement a data retention mechanism that reduced overall database size from 3TB to 500GB, while adjusting chat room listings and search features to accommodate the new rules.
- Bug Resolution: Fixed inconsistencies in reporting metrics calculation, reducing user-raised issues by 90% through extensive refactoring and automated acceptance testing.
Tech Stack
- Backend: Ruby on Rails, Golang
- Databases: PostgreSQL, Redis, Elasticsearch
- Message Brokers: RabbitMQ, Kafka
- Infrastructure: AWS (RDS, EC2, S3, Athena), Docker, Kubernetes
Impact
These optimizations not only improved the user experience for thousands of clients but also significantly reduced infrastructure costs and database loads, allowing the system to scale efficiently as new channels like Tokopedia and Instagram were integrated.