OkCredit Jul 19, 2022

How OkCredit Android App Boosted Network Performance by 30%

Article Summary

OkCredit serves millions in India's Tier-2/3 cities where flaky networks are the norm. Their Android team just cut network call times by 30% with some clever client-side optimizations.

Most engineers think network performance is purely a backend problem. OkCredit's Android team proved otherwise by instrumenting every step of their network calls (DNS, connection pooling, TLS handshakes) and optimizing what they found. They shared their full playbook.

Key Takeaways

Critical Insight

Client-side optimizations delivered 30% faster network calls overall, with connection time dropping 70%.

They also explain why using multiple OkHttp instances in a multi-module app silently kills your performance (and it's probably happening in your codebase right now).

About This Article

Problem

OkCredit's Android app had separate OkHttp instances running in each module, which meant connection pools couldn't be shared across the application.

Solution

Shrey Garg's team merged everything into a single OkHttp instance and adjusted the ConnectionPool settings (maxIdleConnections and keepAliveDuration) to match what the servers expected.

Impact

Connection acquisition time fell by 70% because the pooled connections eliminated the need to repeat DNS lookups, TLS handshakes, and connection setup on follow-up requests.

Recent from OkCredit

Related Articles