<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by MD. MAZHARUL ISLAM KHAN on Medium]]></title>
        <description><![CDATA[Stories by MD. MAZHARUL ISLAM KHAN on Medium]]></description>
        <link>https://medium.com/@mazhar.cse?source=rss-80ff471eb489------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*O9qpmPrZoAgm_nTDvMFP7g.jpeg</url>
            <title>Stories by MD. MAZHARUL ISLAM KHAN on Medium</title>
            <link>https://medium.com/@mazhar.cse?source=rss-80ff471eb489------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 07:12:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mazhar.cse/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How We Scaled SMS Gateway from 200 TPS to 1500 TPS and Changed the Way Our Team Worked]]></title>
            <link>https://medium.com/@mazhar.cse/how-we-scaled-sms-gateway-from-200-tps-to-1500-tps-and-changed-the-way-our-team-worked-9c6cd0fa3309?source=rss-80ff471eb489------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c6cd0fa3309</guid>
            <category><![CDATA[leading-a-team]]></category>
            <category><![CDATA[sms-gateway]]></category>
            <dc:creator><![CDATA[MD. MAZHARUL ISLAM KHAN]]></dc:creator>
            <pubDate>Fri, 20 Feb 2026 19:32:43 GMT</pubDate>
            <atom:updated>2026-02-21T05:43:13.777Z</atom:updated>
            <content:encoded><![CDATA[<p>When I joined SSD-Tech Software Company, I was assigned as Technical Lead of SMS Gateway project. At that time system was handling around 200 TPS. Business target was 1500 TPS.</p><p>Gap was big.</p><p>Initially We thought it is only performance tuning problem. But later we understood, it was architecture problem and also process problem.</p><p>This project changed both system design and team culture.</p><p>This project changed both system architecture and team mindset.</p><h3>Situation When I Joined</h3><ul><li>TPS around 200</li><li>Target 1500 TPS</li><li>SMS failing during peak time</li><li>Heavy database load</li><li>Support team directly calling technical lead for almost every issue</li></ul><p>Main technical bottleneck:</p><ol><li>Too many database operations</li><li>Thread scaling limitation per short code/service</li></ol><p>For every SMS, system was doing multiple DB read/write. Under load, database became slow. Even if CPU was free, application was waiting for DB.</p><p>Increasing threads was not real solution. More threads means more DB contention.</p><p>So we decided to redesign the core architecture.Architecture Before</p><h3>Architecture Before</h3><p>Flow was like:</p><p>Request → DB → Process → DB → Response</p><p>In real implementation:</p><ul><li>Query SMS from DB</li><li>Immediately update status to processing</li><li>Send SMS to operator</li><li>Update status again</li><li>On delivery report, update again</li></ul><p>For one SMS, multiple DB writes were happening.</p><p>Under high load:</p><ul><li>Row locking increased</li><li>Connection usage increased</li><li>Query latency increased</li><li>TPS stuck around 200</li></ul><p>Database became processing engine instead of just storage.</p><h3>Architecture After Redesign</h3><p>We introduced:</p><ul><li>IPC Queue (Inter Process Communication)</li><li>Shared Memory</li><li>Asynchronous database update</li></ul><p>New flow:</p><p>Request → IPC Queue → Worker → Shared Memory → Async DB Update</p><h3>What We Changed Practically</h3><ul><li>We fetched SMS in batch from DB</li><li>Marked them processing in bulk</li><li>Pushed them into IPC queues</li><li>Worker processes handled sending</li><li>Status like sent / failure / delivered kept in memory first</li><li>DB was updated gradually in batch, not instantly</li></ul><h3>Shared Memory Usage</h3><p>Shared memory was used for:</p><ul><li>Application configuration</li><li>Shortcode information</li><li>Service configuration</li><li>Frequently accessed routing data</li></ul><p>This reduced constant DB read for configuration.</p><p>Now configuration access was memory-speed.</p><h3>Crash Safety Improvement</h3><p>One important benefit:</p><p>Using IPC queue and shared memory also helped in crash situation.</p><p>Previously, if application crashed in middle of processing, SMS status could become inconsistent.</p><p>After redesign:</p><ul><li>Messages were in IPC queue</li><li>Current state stored in shared memory or in IPC queue</li><li>Recovery process could re-check and re-process properly</li><li>No SMS information was lost</li></ul><p>System became more fault-tolerant.</p><p>Database was no longer single point of runtime dependency.</p><h3>Result</h3><ul><li>DB write reduced significantly</li><li>Lock contention minimized</li><li>Better concurrency</li><li>More stable under peak load</li><li>TPS improved towards 1500 target</li></ul><p>But technical change was only one side of story.</p><h3>Hidden Bottleneck: Team &amp; Escalation Process</h3><p>Before I took project:</p><p>If SMS failed:</p><p>Support → Direct call to Technical Lead<br> Service → Direct escalation to Development</p><p>Even if problem was:</p><ul><li>Service wrong configuration</li><li>Wrong short code mapping</li><li>Operator delay</li><li>Content format issue</li></ul><p>Development team was involved.</p><p>Too much interruption.<br> Too much context switching.<br> No focus time.</p><p>So process itself was bottleneck.</p><h3>Support Restructuring</h3><p>We divided support into:</p><h3>Level 1</h3><ul><li>Basic ticket handling</li><li>Client communication</li><li>Primary checking</li></ul><h3>Level 2</h3><ul><li>Log analysis</li><li>Service &amp; shortcode validation</li><li>Basic system diagnosis</li></ul><p>We arranged training sessions.<br> Prepared documentation, slides.<br> Explained full SMS lifecycle.<br> Taught them how to analyze and identify failure reasons.</p><p>New rule:</p><p>If Level 2 confirms application issue, only then escalate to development.</p><p>This reduced unnecessary escalation a lot.</p><p>Developers finally could focus on improvement instead of constant firefighting.</p><h3>Building a Team That Can Run Without Me</h3><p>One more thing I focused on.</p><p>I did not want system or knowledge to depend only on me.</p><p>If technical lead becomes single knowledge holder, project is still risky.</p><p>So I worked on growing my team members:</p><ul><li>Shared full architecture knowledge</li><li>Included them in design discussion</li><li>Let them analyze production issues</li><li>Encouraged independent decision making</li><li>Arranged internal knowledge sharing sessions</li></ul><p>Gradually, I reduced involvement in small decisions.</p><p>My goal was simple:</p><p>Even if I am not present, system and team should run smoothly.</p><p>After some time, it became true. I was in leave for 2 months, it run smoothly.</p><p>Team was confident.<br> Support flow was structured.<br> System was stable and scalable.</p><p>For me, this was biggest achievement.</p><h3>Key Learnings</h3><ol><li>Scaling is architecture decision, not thread increase.</li><li>Database should not be runtime processing engine in high TPS system.</li><li>Shared memory can drastically reduce configuration overhead.</li><li>IPC and async design improve both performance and crash safety.</li><li>Organizational structure can be bottleneck like database.</li><li>Strong team is more powerful than strong individual.</li></ol><h3>Final Reflection</h3><p>We did not only move from 200 TPS towards 1500 TPS.</p><p>We:</p><ul><li>Re-architected the system</li><li>Reduced DB bottleneck</li><li>Improved crash recovery</li><li>Structured support workflow</li><li>Built self-dependent engineering team</li></ul><p>For me, real success was building a system and team that does not depend on one person. I am especially grateful to my Senior Project Manager, Hasan Vai, who guided and supported me in reaching my goal. He left the job a few months after mentoring me.</p><p>That experience shaped me not only as Technical Lead, but as leader.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c6cd0fa3309" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>