The Starting Point
In many emerging markets across East Africa, reliable mobile internet is not a given, yet the demand for instant financial services is massive. To drive financial inclusion for unbanked and underbanked populations, financial institutions rely heavily on USSD (Unstructured Supplementary Service Data)—a real-time, session-based protocol that works on any basic GSM phone without requiring mobile data.
For a major FinTech provider operating across countries like Kenya, Tanzania, South Sudan, and Ethiopia, the challenge was scaling this infrastructure. The platform had to process millions of critical financial transactions daily, manage highly volatile telecommunication latency, and handle immense concurrent user sessions.
Additionally, because each telecom operator uses slightly different USSD gateway configurations and protocols, writing separate codebases for every single operator and country was rapidly becoming an operational and maintenance nightmare. The system needed a highly secure, unified architecture that could seamlessly scale across borders while maintaining compliance with strict, evolving financial regulations.
What We Did
Extreme Consulting was selected for this mission-critical project due to our deep expertise in high-load microservice systems and custom telecom protocols. Led by Hristo Trendafilov, our Head of Research and Development and resident Python Expert, we set out to completely re-engineer the platform's core architecture.
Rather than relying on generic, off-the-shelf software, we designed and built a highly tailored, custom USSD framework from scratch using Python, Django, and Django REST Framework. The breakthrough in our approach was creating an abstraction layer that allows the exact same codebase to support not only different countries and multiple telecom operators per country, but also enables running different USSD services on a single machine. This flexibility empowered our client to successfully commercialize and sell USSD services to external, third-party operators. Whether a user initiates a transaction via Safaricom in Kenya, Ethio Telecom in Ethiopia, or an external partner network, our framework normalizes the session payloads into a unified domain model in real time.
To handle the immense traffic of 3.5 million daily requests, we designed a robust, containerized microservice architecture orchestrated via Kubernetes. We deployed Redis for ultra-fast session caching and configured Celery to offload heavy background tasks—such as ledger updates, SMS receipts, and transaction notifications—ensuring the front-facing USSD session remains highly responsive and completes well within the tight session-timeout limits enforced by mobile network operators.
Security in the financial sector is non-negotiable. Our team implemented:
Secure Infrastructure: Dedicated VPN and IPsec tunnels directly to mobile network operator (MNO) gateways to encrypt all transit traffic.
Session Hardening: Strict session-state management and aggressive timeout rules to prevent session hijacking.
Data Masking: Complete masking of sensitive information (such as PINs and account balances) in all application logs.
Regulatory Compliance: Alignment with the Kenya Data Protection Act, CBK Cybersecurity Guidelines, local Communications Authority (CA) technical specifications, and international AML/KYC standards.
During the design phase, our architects pushed back against using standard relational database writes for temporary session states. By shifting all active, short-lived session states entirely to Redis memory clusters, we protected the primary databases from transactional lockups, dramatically reducing latency and keeping the average USSD response time under 200 milliseconds.
The Outcome
Since 2021, our ongoing partnership has grown into a highly stable, 20+ person engineering engagement that powers essential financial pipelines across East Africa:
Massive Scale & Throughput: The platform smoothly handles over 3.5 million daily requests and manages millions of concurrent user sessions without service degradation.
Seamless Multi-Country & Multi-Service Expansion: Thanks to our custom USSD framework and abstraction layer, launching the service with a new telecom operator, in a new country, or spinning up external USSD services on the same infrastructure now requires simple configuration changes rather than extensive code rewrites.
Uncompromising Reliability: Deployed in secure Kubernetes clusters with robust Celery/Redis task queues, the platform maintains near-perfect uptime, providing uninterrupted financial access to millions of users who rely on it daily.
Regulatory Peace of Mind: Fully certified and audit-ready, the platform effortlessly adheres to CBK regulations and data protection laws across all operating regions.
"This project was an incredible engineering challenge. Building an abstraction layer that not only unifies multiple telecom operators and countries into a single codebase, but also enables hosting external services on the same machine, required absolute precision in managing memory and traffic within Kubernetes. I am immensely proud of how our team transformed a complex telecom environment into a stable and scalable financial engine for millions of users."
— Hristo Trendafilov, Technical Lead at Extreme Consulting
Project Metadata & Team
Technologies: Python, Django, Django REST Framework, Celery, Redis, Kubernetes, Docker, Custom-built USSD Framework, VPN/IPsec, MNO Gateway Integrations.
Team: 1 R&D Lead / Python Expert, 3 Software Architects, 12 Full-stack Developers, 4 QA Engineers, 2 DevOps Engineers (Ongoing engagement, 2021–present).