<?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 indiagold Tech on Medium]]></title>
        <description><![CDATA[Stories by indiagold Tech on Medium]]></description>
        <link>https://medium.com/@indiagoldtech?source=rss-9a7496823a8a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Z3WtyzMbe0Dlz9pJWe7M9w.png</url>
            <title>Stories by indiagold Tech on Medium</title>
            <link>https://medium.com/@indiagoldtech?source=rss-9a7496823a8a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 08:42:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@indiagoldtech/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 indiagold collects leads from 10+ channels in a fault tolerant way?]]></title>
            <link>https://medium.com/@indiagoldtech/how-indiagold-collects-leads-from-10-channels-in-a-fault-tolerant-way-6aed9ed847e3?source=rss-9a7496823a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6aed9ed847e3</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[indiagold]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[indiagold Tech]]></dc:creator>
            <pubDate>Mon, 14 Feb 2022 09:04:50 GMT</pubDate>
            <atom:updated>2022-02-14T09:28:53.180Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/96/0*_kpnRoSniMJseWZc" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/0*r9tk14PVg8dXNs1C" /></figure><p>Whether an organisation is big or small , whether it is dealing in the finance or marketing domain, one thing is common in all organisations that they need to survive and grow: <strong>BUILD SALES FUNNEL TO COLLECT LEADS.</strong></p><p>More the number of leads, more the chance you have to convert them, and more is the growth you can achieve by handling the leads in an efficient manner. But what happens if your leads stop flowing in the system — it will be a nightmare, right ? Last week we <a href="http://twitter.com/indiagold">@indiagold</a> also came across the same situation. Here’s an insight into what transpired next. But before that let me share more context about our lead engine and how it works.</p><p>To build our sales funnel, we capture leads from multiple sources and then pass it to a CRM using our middleware.</p><p>The CRM is a third party for us. And keeping data in sync becomes a major challenge at times.</p><p><em>Originally published at </em><a href="https://growthbug.com/how-indiagold-collects-leads-from-10-channels-in-a-fault-tolerant-way-5c148527c59f"><em>https://growthbug.com</em></a><em> on February 14, 2022.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6aed9ed847e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How indiagold rolled out more than 365 releases in less than a year using feature flags?]]></title>
            <link>https://medium.com/@indiagoldtech/how-indiagold-rolled-out-more-than-365-releases-in-less-than-a-year-using-feature-flags-93ba042c8bf8?source=rss-9a7496823a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/93ba042c8bf8</guid>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[apps]]></category>
            <dc:creator><![CDATA[indiagold Tech]]></dc:creator>
            <pubDate>Thu, 16 Dec 2021 04:40:52 GMT</pubDate>
            <atom:updated>2022-02-14T09:31:37.557Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/96/0*sVXduq9G2c0W32F4.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Sf4NtU5Tp9aAiJje" /></figure><p>At indiagold engineering, we wanted to focus on two main objectives as we scaled up:</p><ol><li>Move code into production as soon as possible</li><li>Reduce technical debt on the engineering team from a code management standpoint</li></ol><p>When we started picking up major developments like referral programs for gold loans, gift cards for digital gold, digital gold loan etc — we realised that it was difficult to roll out a working MVP within a sprint and overall product development was spawning across multiple sprints. And until a functionality was fully built and tested, we couldn’t roll out this code into production. We wanted to change this strategy and the idea was that all code should be rolled out into production after every sprint. Hence we decided to implement<strong> feature flags.</strong></p><p>Having bugs in production is a nightmare for anyone. It becomes even more challenging once your user base grows significantly. On top of this if you are using a mobile app, iOS or Android, you can’t fix any bugs immediately since every release has to be approved before it is available for the public to download. So the nagging questions for any fast-growing engineering team remain:</p><ol><li>How do you ensure high-quality releases with minimum bugs/disruptions?</li><li>How do you reduce the technical debt due to code waiting to be rolled out in production?</li><li>How do you ensure that there is no loss in your delivery speed or reliability as you scale up your team?</li></ol><p>Let’s see how we solved these problems at indiagold.</p><p>We hit 1M app installs on the Play Store this July. Our user base grew by 5X. The traffic on the platform hit almost 50K RPM during peak time. Additionally, the multitude of offerings that indiagold launched tripled. From being just a digital gold and gold loan platform we entered into new product offerings like gold locker, super-agent program, gift cards for digital gold, in-house LOS, loan management system, lead lifecycle management, field force dashboard &amp; the business app. All of this within 6 months✌. And we achieved this by being super agile and ensuring more than 1 release per day.</p><p>While multiple factors contribute to such agility like setting up multiple pods with a dedicated development track, unit testing to increase code coverage and many more — the one thing which worked best for us and still remains one of the most underestimated techniques for any engineering team is <strong>feature flags.</strong></p><p>Feature flag in laymen terms is putting “if” code block around a feature. And you load the feature conditionally as illustrated below:</p><p>We improved the above implementation by removing the feature flag checks from our core service methods. Instead, we created a separate feature-based access layer and placed it right at the beginning of our system. As soon as a request hits one of our API endpoints, we use our feature flag service to check access alongside our token and RBAC authentication layers. I have illustrated in the below diagram:</p><p>We intend to do a couple of improvements to our current implementation of the feature flag.</p><ol><li><strong>Phased rollouts </strong>— Ability to roll out a feature partially (like 5%, 10%, etc) and also ensure that we incorporate sticky user session i.e. ensure that the feature flag always remains switched on for the users who are part of the partial rollout.</li><li><strong>Zookeeper</strong> or other similar distributed configuration services — if those turn out to be a better fit</li></ol><p>Our feature flag implementation has helped us separate feature rollout from code deployment. And in turn, we have been able to improve our shipping speed along with a high level of confidence. This is also a stride for us towards continuous deployment. Hope this gives an insight to those who are looking to implement feature flags and boost their shipping speed. Do leave your comments to let me know if this was useful for you!</p><p>Also if this kind of work interests you, apply here- <a href="https://careers.indiagold.co/">https://careers.indiagold.co/</a>. We are always looking out for curious minds to join our team 😀</p><ul><li><strong>Role-based visibility control</strong> — We have added roled based feature access control as well. If we want to enable a feature only for a specific user segment say, priority users, then we can do that easily. Additionally, this can be configured on a per-feature level directly from our database.</li><li><strong>A/B Testing</strong> — We have also started using the feature flag to A/B test different variations of a feature.</li><li><strong>Platform or version-specific features</strong> — Gives us the flexibility to have platform or version-specific features. This also plays a crucial role in helping us maintain backward compatibility whenever we roll out a new version/iteration of an existing feature. We do so by maintaining a mapping of all features and their visibility across different app versions.</li></ul><p>Once the feature flag validation is successful, then only the request is handled by the actual service.</p><p>On the client-side, we have exposed feature configuration using an independent configuration API. The clients can use this API to get the status of all feature flags and then assemble and render the UI accordingly. This implementation ensures that the feature flag remains decoupled from our core functionality logic and can be scaled independently.</p><p>Additionally, instead of powering these feature flags from the database, we have added a caching layer in between. We are using a high availability AWS Redis cluster for it so that it can scale easily during traffic spikes.</p><pre>if(isFeatureActive) {<br> <br> // your feature implementation }</pre><p>While it seems a simple enough feature it’s the actual implementation that makes the most difference.</p><p>The most simple way would be to put a simple “if/else” code in the block to implement a feature and disable it when not needed. We too did the same and started placing simple if/else blocks in the code. The values were powered by our database. For example:</p><pre>ModuleFeatureConfig config = configService.getModuleFeatureConfig(if (Boolean.TRUE.equals(config.getIsFeatureActive())) {<br> ModuleEnum.GOLD_LOAN.name(),<br> // DG Loan implementation<br>} <br> ModuleFeatureEnum.DG_LOAN.name()<br>);</pre><p>However, we quickly realised that if we use the above implementation at scale with numerous feature flags, it will make our codebase difficult to maintain. Also, the feature flag logic should remain decoupled from actual functionality implementation.</p><p><em>Originally published at </em><a href="https://growthbug.com/how-indiagold-rolled-out-more-than-365-releases-in-less-than-a-year-using-feature-flags-d67e29cc2174"><em>https://growthbug.com</em></a><em> on December 16, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93ba042c8bf8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Product/Growth stack we use at indiagold — tools any startup can use]]></title>
            <link>https://medium.com/@indiagoldtech/product-growth-stack-we-use-at-indiagold-tools-any-startup-can-use-34dfe792fbae?source=rss-9a7496823a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/34dfe792fbae</guid>
            <category><![CDATA[product]]></category>
            <category><![CDATA[growth]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[indiagold Tech]]></dc:creator>
            <pubDate>Mon, 11 Oct 2021 05:28:38 GMT</pubDate>
            <atom:updated>2022-02-14T09:48:07.546Z</atom:updated>
            <content:encoded><![CDATA[<h3>Product/Growth stack we use at indiagold — tools any startup can use</h3><p>I get asked about various tools we use for driving growth &amp; product management at indiagold so I decided to share all the tools we are currently using. Considering we are at seed stage, we decided to go with tools which either come free or at extremely low cost. We used several scholarships, startup credits &amp; free credits available across all the tools to keep our costs low.</p><p>NOTE: This is not an endorsement for any product. For each category, there are 4–5 good tools which you must consider before selecting the one for your startup. We all have different needs &amp; usecases so keep that in mind while selecting any tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1AwO-p1DI6V3-L-T.png" /></figure><p>Some of the other tools you can evaluate could be Moengage (Engagement), Mixpanel (Analytics), Branch (Attribution &amp; Referral), Adjust (Attribution), Hubspot (CRM), Balsamiq (Wireframing), marvelapp (Wireframing), Sensortower, (ASO), Appradar (ASO), Haptik (Whatsapp API), Talen &amp; Voucherify (Promo Engine)</p><p>Also remember what Steve Jobs said, tools are just tools, it’s the people who use the tools, matter :)</p><p>indiagold Android App — <a href="https://play.google.com/store/apps/details?id=co.indiagold.gold.buy.loan">https://play.google.com/store/apps/details?id=co.indiagold.gold.buy.loan</a></p><p>indiagold iOS App — <a href="https://apps.apple.com/in/app/indiagold-gold-loan-at-home/id1549055305">https://apps.apple.com/in/app/indiagold-gold-loan-at-home/id1549055305</a></p><p>indiagold Website — <a href="http://www.indiagold.co/">www.indiagold.co</a></p><p>fGtkUfburJThhTN4JT32Q6GgXRx2</p><p><em>Originally published at </em><a href="https://growthbug.com/product-growth-stack-we-use-at-indiagold-tools-any-startup-can-use-8d5e4b668588"><em>https://growthbug.com</em></a><em> on October 11, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34dfe792fbae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Internship experience at indiagold: Working in a high growth startup ]]></title>
            <link>https://medium.com/@indiagoldtech/internship-experience-at-indiagold-working-in-a-high-growth-startup-c13458d5ef?source=rss-9a7496823a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c13458d5ef</guid>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[indiagold Tech]]></dc:creator>
            <pubDate>Fri, 06 Aug 2021 07:35:37 GMT</pubDate>
            <atom:updated>2022-02-14T09:36:17.450Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xSZlrtOpbUc7cNkL.png" /></figure><p>I spent my last three months working as a product management intern at indiagold. I was always fascinated with the idea of working in a high-growth startup because of the kind of learning curve it provides. It was well-timed for me to have the opportunity to get my hands dirty by working in a fast-paced dynamic environment at indiagold, before taking off for my Master’s program.</p><p>At the beginning of my internship, I was scared, excited, uncertain, curious, all at the same time, about what was ahead in this short journey of three months. It began with a PM 101 (more like 102 :P) session with Deepak Abbot which kickstarted the roller coaster ride for the coming months.</p><p>During my three months of internship, the major project I delivered was the lead management system for gold loan leads. It is crucial to have an in-house lead management system as it prevents the risk of data loss, provides more data security, and increases the visibility of lead flow &amp; processes. We were able to deliver around eight integrations for lead capturing in this time. I have worked more on the consumer side of products in my past roles. Thus, working on an internal tool was new and exciting. The entire project gave me a glimpse of system design and architecture (I have these courses in my Masters program as well and this was a good start :D)</p><p><em>Originally published at </em><a href="https://growthbug.com/internship-experience-at-indiagold-working-in-a-high-growth-startup-6eec6bf4a52d"><em>https://growthbug.com</em></a><em> on August 6, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c13458d5ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to encrypt app local data in your android app — A quick guide on how we did it at indiagold]]></title>
            <link>https://medium.com/@indiagoldtech/how-to-encrypt-app-local-data-in-your-android-app-a-quick-guide-on-how-we-did-it-at-indiagold-cf18147721a5?source=rss-9a7496823a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf18147721a5</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[encryption]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[indiagold Tech]]></dc:creator>
            <pubDate>Wed, 30 Jun 2021 10:59:01 GMT</pubDate>
            <atom:updated>2022-02-14T09:34:23.061Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to encrypt app local data in your android app — A quick guide on how we did it at indiagold</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/96/0*aVCDBG1DhvdWjhzl.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/0*O-Wm7L1xdbyOr8SX.jpeg" /></figure><p>According to “Mobile Security Project” under “The Open Web Application Security Project (OWASP)” insecure data storage is one of the top ten security issues for smartphones because sensitive information can be exposed if not carefully protected.</p><p>Until now there was no native solution for data encryption to encrypt user data in your Android app. So we used to handle data encryption by creating our own classes and logics, which was a very complex process. And the most complicated thing was where to store the encryption key and what algorithm should we use for encryption?</p><p>But things have completely changed with the native <strong>Encrypted Shared Preference</strong> library from the <strong>Android Jetpack</strong>. It provides an implementation of the security best practices related to reading and writing data at rest, as well as key creation and verification. So lets understand some basics on encryption and what is the difference between shared preferences and encrypted shared preferences.</p><p>Shared preferences have always been a favorite among Android developers. It’s fast, extremely easy to use (even easier with kotlin extension methods), and never fails. Even an SQL query might fail sometimes, but never a shared preference.</p><p>Gold loan screen</p><p>Initially, we were also using SharedPreferences in our <a href="https://play.google.com/store/apps/details?id=co.indiagold.gold.buy.loan">indiagold app</a> to store user and app data. As <a href="https://indiagold.co/">indiagold</a> is a <a href="https://play.google.com/store/apps/details?id=co.indiagold.gold.buy.loan">financial app</a>, it contains some sensitive data that should always be encrypted. Hence we decided to store all the sensitive data in encrypted form using <strong>Encrypted Shared Preferences</strong>.</p><h3>Shared Preferences</h3><h3>What is encryption?</h3><p>What is encryption? It is a process that encodes a message so that it can only be read by certain people. It typically uses an algorithm to scramble or encrypt data and then uses a key for the receiving party to unscramble or decrypt the data. The message contained in an encrypted message is referred to as plain text. In its encrypted, unreadable form it is referred to as ciphertext.</p><p>For any encryption to work, it needs a key.</p><p>This is a relatively new <a href="https://developer.android.com/jetpack">Jetpack</a> library that offers easy-to-use access encryption-related functions for Android developers.</p><p>This also has 2 types of keys:</p><ul><li><strong>Keyset: </strong>Keys used to encrypt each file or shared preference value. This is also stored in the shared preferences. <em>It’s also encrypted</em>.</li><li><strong>Master Key: </strong>As the name suggests, a <em>master </em>key that encrypts ALL these keysets. And this key is stored in the <a href="https://developer.android.com/training/articles/keystore">AndroidKeyStore</a>.</li></ul><blockquote><strong><em>A key is a random string of bits created specifically for scrambling and unscrambling data.</em></strong></blockquote><p><em>Note: The version supports Marshmallow(API 23) and above only. Newer versions support 21 and below but they won’t use keystore.</em></p><p><strong>Let’s see how to work with Encrypted preference in the code</strong></p><p>EncryptedSharedPreferencesextends SharedPreferences class which means you don&#39;t need to learn anything new except the configuration of the new library.</p><p>Similarly, retrieve data using the same Encrypted Shared Preferences instance.</p><p>Now that we are done with the basics, let’s move on to shared preferences.</p><h3>Encrypted Shared Preferences</h3><h3>Steps on how to use encrypted shared preference</h3><pre>minSdkVersion 21</pre><pre>implementation &quot;androidx.security:security-crypto:1.1.0-alpha03&quot;</pre><pre>// Read from encrypted preference<br>val value = preferences.getString(&quot;name&quot;, &quot;&quot;)</pre><h3>How did we optimise encrypted shared preference to make it faster for our <a href="https://play.google.com/store/apps/details?id=co.indiagold.gold.buy.loan">indiagold app</a>?</h3><p><a href="https://indiagold.co/">indiagold</a> stores a large amount of data in SharedPreferences that requires performing more read-write and encryption-decryption operations that lead to application slowness so speed was a concern.</p><p>So it was not a viable solution to encrypt whole preferences data. Instead, we implemented a hybrid solution that would encrypt only sensitive data like access-token and user’s personal data. And will ignore the non-sensitive data. Also, we added a layer of cache that stores the latest fetched data that makes the app faster and smoother.</p><p>Overall the Encrypted Shared Preference class is pretty much the same as accessing the old and sweet shared-preference class.</p><p>Thank you for reading. Happy Coding :)</p><p>P.S. — Have any suggestions, do comment below. Also, if you want to solve exciting engineering problems like the above, do apply here to join our team: <a href="https://angel.co/company/indiagold/jobs">https://angel.co/company/indiagold/jobs</a>.</p><p><em>Originally published at </em><a href="https://growthbug.com/how-to-encrypt-app-local-data-in-your-android-app-a-quick-guide-on-how-we-did-it-at-indiagold-8f56e1d87389"><em>https://growthbug.com</em></a><em> on June 30, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf18147721a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How we optimised our indiagold react app to improve our PageSpeed performance score]]></title>
            <link>https://medium.com/@indiagoldtech/how-we-optimised-our-indiagold-react-app-to-improve-our-pagespeed-performance-score-2a3fdda9ce0f?source=rss-9a7496823a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a3fdda9ce0f</guid>
            <category><![CDATA[sem]]></category>
            <category><![CDATA[seo]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[website]]></category>
            <dc:creator><![CDATA[indiagold Tech]]></dc:creator>
            <pubDate>Tue, 08 Jun 2021 03:13:47 GMT</pubDate>
            <atom:updated>2022-02-14T09:37:45.303Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/50/0*aZmNzjwqdb1KTJ6r" /></figure><p><strong>When it comes to optimising SASS Application there is no silver bullet to optimizing the application.</strong></p><p>But before jumping into the optimization of the <a href="https://indiagold.co/">web app</a>. it is very important that you must follow the very simple concept of KISS (KEEP IT SIMPLE STUPID)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xU3m7Ant4Gekj9nA" /></figure><p>Photo by <a href="https://unsplash.com/@filisantillan?utm_source=medium&amp;utm_medium=referral">Filiberto Santillán</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></p><pre>if(counter.current===0 &amp;&amp; request is in loading state){<br> counter.current = 1<br> AJAX call<br>}</pre><pre>React.lazy(()=&gt;{})// or function cb () {} React.lazy(cb)</pre><pre>const updatedValue = useMemo(()=&gt;{<br> // complex calculation<br> return value<br>})</pre><p>When it comes to component</p><pre>(before) =&gt; export default component (after) =&gt; export default memo(component)</pre><blockquote><strong><em>NOTE</em></strong><em>: Don’t apply memo HOC everywhere since it increases memory usage of the client browser and may end up costing you. So you have to use it smartly.</em></blockquote><p><em>Originally published at </em><a href="https://growthbug.com/how-we-optimised-our-indiagold-react-app-to-improve-our-pagespeed-performance-score-4489c4e6b248"><em>https://growthbug.com</em></a><em> on June 8, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a3fdda9ce0f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How we solved an elusive memory leak issue at indiagold]]></title>
            <link>https://medium.com/@indiagoldtech/how-we-solved-an-elusive-memory-leak-issue-at-indiagold-51e6c2d05074?source=rss-9a7496823a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/51e6c2d05074</guid>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[memory-leak]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[indiagold Tech]]></dc:creator>
            <pubDate>Thu, 01 Apr 2021 05:35:13 GMT</pubDate>
            <atom:updated>2022-02-14T09:40:03.997Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s a developer’s worst nightmare, when your server suddenly stops and traffic is at peak &amp; you have no idea why it happened. This article is about a similar scenario we faced at <a href="https://indiagold.co/">indiagold</a> last month.</p><p><strong>Introduction</strong></p><p>We have setup our infra on AWS autoscaling to handle traffic surge. Lately our app saw large traffic due to multiple promotions that went viral on several social media platform. More detail about it can be found <a href="https://growthbug.com/how-indiagold-scaled-its-backend-to-handle-100x-traffic-spike-b08e298186cb">here</a>.</p><p><strong>Here comes the trouble</strong></p><p>After few hours of first surge although the autoscaling kicked in, we observed the EC2 instances started reaching high RAM usage (80–90%) and then eventually started throwing out of memory errors. This made our app literally unusable.</p><p>The issue started repeating with every surge in traffic. Since the instances became unhealthy on peak traffic (50–100X), we were loosing 5–10 grams worth of gold with every downtime of 2–3 minutes, not even exaggerating.</p><p>As part of fire fighting we increased the EC2 capacity from t3.large to m5.xlarge, so we get the breathing space while we get to the root of the issue.</p><p><strong>The investigation begins</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*dJ_J5L5kwaoOftOF.jpeg" /></figure><p>On detailed monitoring, we saw an unusual metric on NewRelic. The thread count kept on increasing, it reached as high as 17k-18k and the application crashed. So we decided to take the thread dump from the server and boom, we had our first breakthrough.</p><p>As we see from the above thread dump, number of thread named “Analytics” were abnormally high. There were 14000 threads and 12700 were named “Analytics”. Now the question was who was creating these and why were these abnormally high in number . There was definitely some leak.</p><p>Now we started looking at the code, a quick search on <a href="https://www.jetbrains.com/idea/">Intellij</a> showed only one place where this word was mentioned, it was the <strong>Segment</strong> code (we use segment to push analytics events). Here is the code snapshot for reference.</p><p><em>Originally published at </em><a href="https://growthbug.com/how-we-solved-an-elusive-memory-leak-issue-at-indiagold-22a4ee47136"><em>https://growthbug.com</em></a><em> on April 1, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51e6c2d05074" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A glimpse into the tech stack used by indiagold]]></title>
            <link>https://medium.com/@indiagoldtech/a-glimpse-into-the-tech-stack-used-by-indiagold-e2d5eac79e50?source=rss-9a7496823a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2d5eac79e50</guid>
            <category><![CDATA[stack]]></category>
            <category><![CDATA[platform]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[indiagold Tech]]></dc:creator>
            <pubDate>Mon, 22 Feb 2021 09:47:43 GMT</pubDate>
            <atom:updated>2022-02-14T09:42:00.723Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/96/0*VkqCTY691Bdor19J.png" /></figure><blockquote><em>Did you know — We have rolled out ~300 backend releases in less than a year.</em></blockquote><p>After I wrote about how <a href="https://growthbug.com/how-indiagold-scaled-its-backend-to-handle-100x-traffic-spike-b08e298186cb">we scaled our backend to handle exponential traffic spikes</a>, we have been getting requests to explain our tech stack. So here is a glimpse into the tech stack which enabled us to iterate quickly. To begin with, let me show you how our tech stack looks like:</p><p>indiagold tech stack</p><p>Right now we have our consumer app on 3 platforms — <a href="https://play.google.com/store/apps/details?id=co.indiagold.gold.buy.loan">Android</a>, <a href="https://indiagold.co/">Web</a> and <a href="https://apps.apple.com/in/app/indiagold-gold-loan-at-home/id1549055305">iOS</a>. Apart from this, we have a business app, admin panel and an analytics platform for our internal business needs. The above tech stack caters to all of the above. Here is how we decided on it.</p><p>AWS has a wide range of tools that helps any startup get started quickly and avoid re-inventing the wheel. It lets you focus on building your actual use case and product offerings. Plus we were getting free credits 😉 — as we were just starting we had to be as cost-effective as possible.</p><p>Here are a few pointers which can help any startup decide the tech stack they should choose:</p><ol><li>Mature language and framework which solves for your use case out of the box</li><li>Allows you to ship fast while staying lean</li><li>Provides high reliability and security (depends on your use case)</li><li>Ensures effortless and on-demand scalability</li><li>Is cost-effective — use credits wherever possible to keep your burn to a minimum</li><li>Last but not least something which compliments your engineering team’s expertise</li></ol><p>PS — This blog is not an endorsement for any tools mentioned earlier in the blog. I am just sharing what worked for our use case.</p><p>We are always hiring! 😄 Do check out our open positions here: <a href="https://angel.co/company/indiagold/jobs">https://angel.co/company/indiagold/jobs</a> or simply write to us at hello@indiagold.co.</p><p>All of the above decisions also helped us keep our team as lean as possible.</p><p>Java along with springboot solves our core fintech use case out of the box and our team was well versed with it. Java is also a proven and mature language, especially from a security standpoint. Also, it has a huge ecosystem of third-party libraries like AWS services and tools.</p><p>On the frontend, we are using React for the web app and Kotlin for our android app. Again the reason was to choose something which was already proven, had a mature ecosystem and our development team was comfortable with it.</p><p>Recently we have also launched our iOS app built on Swift.</p><p><em>Originally published at </em><a href="https://growthbug.com/a-glimpse-into-the-tech-stack-used-by-indiagold-8a5e401852f0"><em>https://growthbug.com</em></a><em> on February 22, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2d5eac79e50" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How did we solve the low network connectivity problem for our Loan Managers working in the field?]]></title>
            <link>https://medium.com/@indiagoldtech/how-did-we-solve-the-low-network-connectivity-problem-for-our-loan-managers-working-in-the-field-3e2ac9d555c2?source=rss-9a7496823a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e2ac9d555c2</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[latency]]></category>
            <dc:creator><![CDATA[indiagold Tech]]></dc:creator>
            <pubDate>Thu, 18 Feb 2021 06:38:35 GMT</pubDate>
            <atom:updated>2022-02-14T09:47:07.944Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xNLx23woqJUlo0nj.jpeg" /></figure><p>The first thing that came to my mind is <em>. </em>Those who are not familiar with <em>Room, </em>it is a persistence storage library for android. Room provides an abstraction layer to access SQLite database in an android app while harnessing the full power of SQLite. Room really makes life easy and allows to query database using short annotations.</p><p>As the timeline was short, rather than designing the whole schema from zero, we decided to take help of RTCs — Room Type Converters. And we made an entity with <strong>n</strong> number of columns (where n = no of steps in application). We started saving each screen’s data in json form to the db, and guess what’s the good thing, we don’t have to manage the serialization and deserialization of json to model and vice-versa because of RTCs.</p><p>After designing the local database, next we changed the logic of our repository layer and started saving the data in case of low network availability. At the end of the process, when the loan manager submits the application, we push all data to our servers at once. This resolves the dependency on the network throughout the application and hence makes the whole loan booking process quite easy for our loan managers.</p><p>Here is our new app architecture:</p><p>App architecture along with local database</p><p>And guess what, it took us only 2 days to figure out, plan and execute the whole solution! :)</p><p>Looking to learn more about our app architecture or interested in joining our engineering team? Do write to us at careers@indiagold.co!</p><p><em>Originally published at </em><a href="https://growthbug.com/how-did-we-solve-the-low-network-connectivity-problem-for-our-loan-managers-working-in-the-field-70ec1e0c954e"><em>https://growthbug.com</em></a><em> on February 18, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e2ac9d555c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How indiagold scaled its backend to handle 100x traffic spike?]]></title>
            <link>https://medium.com/@indiagoldtech/how-indiagold-scaled-its-backend-to-handle-100x-traffic-spike-489f73510b63?source=rss-9a7496823a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/489f73510b63</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[indiagold Tech]]></dc:creator>
            <pubDate>Wed, 10 Feb 2021 17:27:01 GMT</pubDate>
            <atom:updated>2022-02-14T09:32:53.255Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/96/0*GGowqXtShtETmNo0.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fBvKbhB9r21MHAZ9.jpeg" /></figure><p>On this Republic Day, we launched our new referral program and it instantly went viral on Telegram and YouTube. Since then we have been constantly getting traffic spikes up to 100x. We even ended up being the #5 app on <a href="https://play.google.com/store/apps/details?id=co.indiagold.gold.buy.loan">Play Store</a>.</p><p>Before we go to the actual story, let me first tell you about our current infrastructure on a high level. We are hosted on AWS and have a monolith architecture in the Springboot framework. We are using their elastic load balancer along with a host of different AWS services including EC2, CodeBuild, Code Deploy, SQS, RDS, S3, ElastiCache, and many more. I have captured major ones in the diagram below with special attention to our Digital Gold service as this was the backbone for the referral program:</p><p>High-level architecture</p><p>For any traffic spike, we have our auto-scaling groups configured to scale up automatically in a step manner when CPU utilization goes beyond 40% or RAM usage goes above 60%.</p><p>So, on normal days we were doing 200–400 RPM and after we launched our new referral program we started getting traffic spikes up to 40K RPM. One such instance is illustrated below:</p><p>The next step was query optimization — we checked the slow logs of our MySQL and started looking at slow queries one by one.</p><p>The first one was our gold live rate API which is the most hit API in our app. It is cached using Redis — thankfully we had introduced caching way early in our journey but there was a piece that used to fetch change from yesterday’s price. This was not cached!</p><p>Gold Live Rate API</p><p>We cached this part of the API as well. As soon as we deployed this change as a hotfix, our CPU utilization went down to 54%. Never realized that adding caching can have such a huge impact instantly. 😃</p><p>Next, we identified two more SQL queries and realized the indexing on the underlying schema was sub-optimal. Mostly due to a change in the schema, we had added new columns and the resulting query had also changed over a period of time. MySQL’s explain command came to the rescue and we added few unique indexes to get going. The CPU dropped to 24% now.</p><p>40K RPM traffic spike</p><p>So here is a quick checklist in case you want to be better prepared for such a traffic surge. Happy scaling! 😉</p><p>As we grow further, our infrastructure can be made more robust to handle similar traffic surges. Here is what we have on our roadmap:</p><ol><li>Moving forward, we will set up multi-AZ RDS to be able to vertically scale up our database with failover. Simultaneously, we will explore AWS Aurora. This will help us ensure high availability.</li><li>We need to introduce read-write separation on the application layer.</li><li>Eventually, we intend to decouple the independent pieces of our infrastructure and gradually move towards a microservices architecture.</li></ol><p>P.S. — Have any suggestions, do comment below. Also, if you want to solve exciting engineering problems like above, do apply here to join our team: <a href="https://angel.co/company/indiagold/jobs">https://angel.co/company/indiagold/jobs</a>.</p><ol><li>Use a cloud-based load balancer</li><li>Always ensure you have a caching layer</li><li>Optimize your slow queries — better to do it during the feature implementation stage</li><li>Plan at the architecture level to scale your application and DB instances with zero downtime</li><li>Remember to upgrade the plan of all your third-party services (easily overlooked 🙂)</li></ol><p>This is almost a 100x increase in RPM while our backend resources were initially provisioned to handle only 10x surge i.e. up to 4K RPM.</p><p>To put it simply it is like trying to upgrade your regular car into a Ferrari while driving and you’ve no time to plan or stop.</p><p>For every startup, it’s a dream come true if they get exponential traffic. But what happens once you do get it? How do you handle such a high load? Is there a playbook for it?</p><p>Here is <a href="https://indiagold.co/">indiagold</a> ‘s story of how we scaled our backend to handle 100x traffic spikes.</p><p>The first time we got such a high load, we hit 10K RPM in just 15 mins and started getting CloudWatch CPU usage alerts for multiple app server instances. The auto-scaling group had automatically spun up more instances but that didn’t help. We checked our error logs and bingo our RDS was responding sluggishly. There was a CloudWatch alarm from RDS as well. Very soon the RDS CPU usage touched 100% and the app users started experiencing degraded performance.</p><p>All hell broke loose — literally!</p><p>We had to ensure that indiagold service was not impacted in any way during such spikes. Any service disruption would mean a bad user experience and directly impacts the business. So here is what we did:</p><p>We have a simple master-slave RDS configuration but the slave is mostly used by a third-party app for reporting. The write-read separation is not there on the application layer. So sending our app read queries to a different replica was not possible instantly as it would involve code change and take precious time which we didn’t have. So we took a calculated risk and went ahead with vertical scaling with a downtime of 3 minutes. We scaled up our RDS instances from t3.large to m5.2xlarge.</p><p>Further, we realized that our t3.large EC2 instances were frequently hitting 80% — 90% memory usage. Although the auto-scaling group was deploying additional instances it was taking 1–2 minutes before a new instance would spawn up and become ready to receive traffic.</p><p>We launched a new auto-scaling group with the m5.xlarge series. This bigger box meant more room for memory to grow and helped handle any sudden spikes till the time the auto-scaling group deployed new instances. Also, switching to a bigger box made it easier to roll out any hotfix, as the number of instances in the auto-scaling group would be less for the same traffic — speeding up deployment. Not that we wanted to deploy hotfixes now and then but it’s better to be prepared.</p><p>Further, we checked the resource usage limits in our EC2 instance and adjusted them as per m5 instances so that our application server could make full use of available resources especially the open file descriptors.</p><p>Lastly, we started hitting the plan limit of all our third-party services and needed to upgrade immediately to prevent service disruption from their end. Additionally, we applied for resource increase for AWS services as well.</p><p>The above steps helped us to keep the system afloat with minimal disruptions and be future-ready.</p><blockquote><em>As its said “Lessons always come dressed up as detours and roadblocks”</em></blockquote><p><em>Originally published at </em><a href="https://growthbug.com/how-indiagold-scaled-its-backend-to-handle-100x-traffic-spike-b08e298186cb"><em>https://growthbug.com</em></a><em> on February 10, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=489f73510b63" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>