<?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 Vineet on Medium]]></title>
        <description><![CDATA[Stories by Vineet on Medium]]></description>
        <link>https://medium.com/@sde.vineet?source=rss-d43a96a114c0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Hxh4a18uujudBzWS</url>
            <title>Stories by Vineet on Medium</title>
            <link>https://medium.com/@sde.vineet?source=rss-d43a96a114c0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 15:50:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sde.vineet/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[A Simple Yet Powerful Email Builder: Saving Almost 70% of Engineering Bandwidth]]></title>
            <link>https://medium.com/internshala-tech/a-simple-yet-powerful-email-builder-saving-almost-70-of-engineering-bandwidth-32cfa205fcc4?source=rss-d43a96a114c0------2</link>
            <guid isPermaLink="false">https://medium.com/p/32cfa205fcc4</guid>
            <category><![CDATA[boosting-efficiency]]></category>
            <category><![CDATA[custom-email-template]]></category>
            <category><![CDATA[streamline-workflow]]></category>
            <dc:creator><![CDATA[Vineet]]></dc:creator>
            <pubDate>Sat, 22 Jun 2024 06:52:06 GMT</pubDate>
            <atom:updated>2024-06-24T08:54:12.252Z</atom:updated>
            <content:encoded><![CDATA[<p>Back when I had just completed over a year with Internshala Trainings, we faced a significant challenge that prompted us to rethink our approach to email creation.</p><p><strong>Email template building requests were frequent</strong>, involved some personalisation, and consumed most of our engineering bandwidth without adding much value. While these tasks were useful for new joiners to learn the constraints of email templates, they were a drain on our resources for the rest of us.</p><p>I did some quick research and found that from May 2022 to July 2022, we received 85 email requirements. These <strong>took</strong> <strong>45 development days to complete out of 65 working days, meaning we spent nearly 70% of our time just building emails.</strong></p><p>This was an alarming amount of time spent on something that had no long-term value for engineers, as each email was used only once and rarely reused. It was clear that we needed a better solution.</p><p>I realised that every email we created had a few common elements: text only, image only, text on top of an image, a call-to-action button, and a horizontal line. With this realisation, the idea for a tool began to take shape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*zWCPDZ3LKeB6IikQ3CSFyw.png" /><figcaption>Internshala’s Custom Email Builder UI: Easily add common elements like text only, image only, text on top of an image, call-to-action buttons, and horizontal lines to your email templates.</figcaption></figure><p>With this concept in mind, I started creating the tool. It took me 5 official development days to work on the back-end and front-end, and a few unofficial hours to polish it. Once the tool was created, the impact was significant:</p><ol><li><strong>Reduced the learning curve:</strong> Various email clients have different rules for displaying email content, requiring custom code for each. Now, this extra learning curve is no longer needed.</li><li><strong>Time efficiency:</strong> The time to create an email dropped from one day to just a few minutes.</li><li><strong>User-friendly UI:</strong> With a simple UI, following a Figma design, any non-tech person could create an email.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wHv2iLSJsTx-9kAUNa_Sgw.png" /><figcaption>Internshala’s Comprehensive Email Builder: Featuring a user-friendly UI with live preview, dark mode, and custom preheaders. Simplifying email creation for our team!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GSNP1lKsvrxNoSI_cl4ONQ.png" /><figcaption>Seamless Image Uploading: Upload and manage images directly within the email builder tool, ensuring efficient and streamlined email template creation.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lrb0R3jdhQo2Xj2-pizimQ.png" /><figcaption>Flexible Template Management: Easily edit, duplicate, or delete email templates with a few clicks, making customization and updates hassle-free.</figcaption></figure><p>The tool included the following features:</p><ol><li><strong>Live Preview:</strong> As team members fill in the details on the left, they can see a live preview on the right. This reduces confusion and allows immediate modifications if something doesn’t look right.</li><li><strong>Dark Mode:</strong> The team can toggle the preview between light mode and dark mode, helping them identify how the email would look to users with dark themes on their mobile devices.</li><li><strong>Preheader:</strong> The option to add a custom preheader to the emails.</li><li><strong>CSS Support:</strong> The tool supports various CSS properties, including height, alignment, padding, font-size, font-weight, line-height, and inline changes.</li><li><strong>Inbuilt Image Uploading Tool:</strong> Team members can directly upload images from the tool, which takes care of adding the image to the correct position, renaming the file, and uploading it to our Cloud Storage (AWS S3).</li><li><strong>Download File / Copy to Clipboard:</strong> Once the template is created, the entire code can be downloaded as an HTML file or copied to the clipboard for use on platforms like Netcore.</li><li><strong>Edit / Duplicate / Delete Options:</strong> These options simplify the team’s efforts in managing templates.</li></ol><p>There are still a few missing features or limitations:</p><ol><li>Adding content in a horizontal flow (row-wise).</li><li>Adding list items in one go.</li></ol><p>However, these limitations never troubled us due to careful planning and new protocols implemented by the design team.</p><p>With the design team’s support, we created design protocols that ensured new email templates followed the tool’s limitations. This helped us immensely.</p><p>Special thanks to <a href="https://www.linkedin.com/in/shubhmisaki/">Shubham Singh</a> for helping create the design protocol and implementing it, and <a href="https://www.linkedin.com/in/somya-batra-spjimr/">Somya Batra</a> for helping curate the requirements, test the tool, coordinate with the marketing team, understand their expectations, and give them walkthroughs.</p><p>Now, <strong>almost two years later, we haven’t received any email requirements.</strong></p><h3>In Conclusion</h3><p>With a simple yet powerful tool, we created a significant impact. We saved:</p><ol><li><strong>Almost 70% of engineering bandwidth:</strong> This time is now invested in improving our product and working on core engineering tasks.</li><li><strong>Reduced effort from product managers:</strong> Less time spent curating requirements and following up.</li><li><strong>Time efficiency:</strong> Creating an email now takes a few minutes instead of a day, allowing the marketing team to create emails at their convenience.</li><li><strong>Widespread use:</strong> This tool is now used by Internshala (IS), Internshala Trainings (IST), and Internshala Student Partner (ISP) teams.</li></ol><p><strong>Go Live Date:</strong> 12th September 2022</p><p><em>P.S.: Please don’t judge the UI of the email template tool — it was created by me, and I’m not the best at designing.</em></p><p>Thank you for reading! I hope you found this article helpful. If you have any questions or suggestions, please leave a comment. Your feedback helps me improve.</p><p>Don’t forget to follow for more updates.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32cfa205fcc4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/internshala-tech/a-simple-yet-powerful-email-builder-saving-almost-70-of-engineering-bandwidth-32cfa205fcc4">A Simple Yet Powerful Email Builder: Saving Almost 70% of Engineering Bandwidth</a> was originally published in <a href="https://medium.com/internshala-tech">Internshala Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reducing Costs and Improving Efficiency: Transitioning from AWS RDS to a Self-Hosted Queue System]]></title>
            <link>https://medium.com/internshala-tech/reducing-costs-and-improving-efficiency-transitioning-from-aws-rds-to-a-self-hosted-queue-system-0c56b3f1687a?source=rss-d43a96a114c0------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c56b3f1687a</guid>
            <category><![CDATA[cloud-cost-reduction]]></category>
            <category><![CDATA[mysql-on-ec2]]></category>
            <category><![CDATA[email-digest-optimization]]></category>
            <category><![CDATA[self-hosted-queue-systems]]></category>
            <category><![CDATA[moving-from-aws-rds]]></category>
            <dc:creator><![CDATA[Vineet]]></dc:creator>
            <pubDate>Sun, 16 Jun 2024 04:10:00 GMT</pubDate>
            <atom:updated>2024-06-24T08:54:04.595Z</atom:updated>
            <content:encoded><![CDATA[<p>At Internshala, we compute digests for students to send them highly accurate recommended internships and jobs, making it easy for them to apply through our platform.</p><p>To generate accurate recommendations, our cron jobs perform heavy computations. Doing this in real-time while sending emails is not feasible, as it would slow down the rate at which we send digest emails to all our users. Instead, we compute the entire digest every morning around 4 AM for approximately 1 million users and store the content in AWS RDS. We then send these digest emails later in the day using AWS SES.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*Me8wjJbzHYNPcpWbI6Vhpg.gif" /><figcaption>Internshala’s internal server handles heavy computations for accurate recommendations, storing results in AWS RDS for later email dispatch using AWS SES.</figcaption></figure><h3>The Problem</h3><p>Storing the computed recommendations in RDS posed several issues:</p><ol><li><strong>IOPS:</strong> Inserting data into RDS during computation, reading the data while sending emails, updating fields for sent mails and retries, and finally deleting these emails at the end of the day collectively spiked our IOPS to 4 million requests. To manage our IOPS requests, we implemented batching while inserting and deleting data, and even truncating the table if all the emails are sent, which helped reduce many IOPS requests to RDS.</li><li><strong>Storage Costs:</strong> Storing email content in the database can reach up to 65 GB of data. This increased our storage costs significantly and led to more expenses for database snapshots. I recall one instance when a permission issue prevented the truncate command from working, causing the table size to grow to over 500 GB.</li></ol><p>These daily costs accumulated and eventually resulted in high billing expenses.</p><h3>Exploring Solutions</h3><p>To mitigate these issues, we researched implementing a self-hosted queue instead of using managed services like RDS. Here are the approaches we considered:</p><ul><li><strong>AWS SQS:</strong> This option did not suit our use case since we needed to store heavy email content for a longer period, whereas SQS can hold data for a maximum of 15 minutes.</li><li><strong>RabbitMQ &amp; Apache Kafka:</strong> These options showed promise, and we are still evaluating them for a long-term solution.</li></ul><h3>The Interim Solution: Self-Hosted MySQL</h3><p>For a quick solution with minimal changes — what we call minimum effort versus high value — we decided to self-host a MySQL server on our EC2 instance. Here’s how we implemented it:</p><ol><li><strong>Setting Up MySQL:</strong> We installed the MySQL server on our EC2 instance.</li><li><strong>Configuring Doctrine:</strong> We adjusted Doctrine’s DB connection (the ORM used in our PHP application) to connect to the new MySQL server.</li><li><strong>Process Optimization:</strong> We continued to process all digests using cron jobs, but now saved the data in the local MySQL database. When the time came to send emails, we retrieved the data and sent it via SES.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*_NH37cXrYzqmN9jDpt9fIw.gif" /><figcaption>Internshala’s internal EC2 server runs application logic to process digests, storing data in a MySQL database on the same EC2 instance for optimized performance and efficiency.</figcaption></figure><h3>Benefits Achieved</h3><p>This approach provided several immediate benefits:</p><ol><li><strong>Reduced IOPS:</strong> By processing and storing data locally, we significantly reduced the IOPS load on our system.</li><li><strong>Lower Storage Costs:</strong> Moving away from RDS eliminated the high storage costs associated with it.</li></ol><h3>Next Steps</h3><p>We plan to create a dedicated EC2 instance for this task. Once our research for the best long-term solution concludes, we will implement it on this new EC2 along with all necessary monitoring, calling it our queue microservice.</p><p><strong>Go-Live Date:</strong> 5th June 2024</p><p>Thank you for reading! I hope you found this article helpful. If you have any questions or suggestions, please leave a comment. Your feedback helps me improve.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c56b3f1687a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/internshala-tech/reducing-costs-and-improving-efficiency-transitioning-from-aws-rds-to-a-self-hosted-queue-system-0c56b3f1687a">Reducing Costs and Improving Efficiency: Transitioning from AWS RDS to a Self-Hosted Queue System</a> was originally published in <a href="https://medium.com/internshala-tech">Internshala Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enhancing Server Performance: A 75% Reduction in WhatsApp API Load Through GoLang Microservice]]></title>
            <link>https://medium.com/internshala-tech/enhancing-server-performance-a-75-reduction-in-whatsapp-api-load-through-golang-microservice-8ec93e1fccce?source=rss-d43a96a114c0------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ec93e1fccce</guid>
            <category><![CDATA[server-optimization]]></category>
            <category><![CDATA[cloud-cost-reduction]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[php-scalability]]></category>
            <category><![CDATA[aws-solutions-architect]]></category>
            <dc:creator><![CDATA[Vineet]]></dc:creator>
            <pubDate>Sat, 15 Jun 2024 16:30:14 GMT</pubDate>
            <atom:updated>2024-06-24T08:53:09.439Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Tech Stack:</strong></p><ul><li><strong>Main Server:</strong> CodeIgniter with PHP backend.</li><li><strong>Microservice:</strong> GoLang script.</li></ul><p>Recently at Internshala Trainings, we faced an unexpected challenge with the WhatsApp Cloud API that significantly impacted our server performance. Here’s how we addressed it and optimised our system.</p><p>Whenever we sent a message to a user, WhatsApp responded with up to three status updates. For instance, sending “Hi” could result in statuses like Sent, Delivered, Read, or even Failed. Additionally, if a user replied, it would start another cycle of messages and responses.</p><figure><img alt="Internshala to WhatsApp request-response flow" src="https://cdn-images-1.medium.com/max/1024/1*QJ0nmWcoteKJrci5nLpseg.gif" /></figure><p>To put it simply, for <strong>every message we sent, our servers could receive up to five responses</strong>. This influx of responses created a sudden load on our main website servers (EC2s), causing performance bottlenecks and reducing their ability to handle traffic efficiently.</p><p>Throughout the day, when the traffic was constant, everything went smoothly. However, during the evening when most of our cron jobs run, we saw a sudden spike in the CPU utilisation of our main traffic-handling server. We have a separate internal server for running all our cron jobs, so on one end, cron jobs are sending thousands of WhatsApp communications to the users. On the other end, we got three times the requests that we sent to our main server for processing WhatsApp’s webhook responses based on the response type, storing them in AWS RDS, and replying back to all the users. This not only created a sudden spike in CPU usage but also increased the IOPS for the RDS, thus consuming crucial bandwidth that we should have used for our traffic. This situation might even lead to launching a new server (EC2) instance to handle the extra traffic.</p><p>Now you might wonder why this is such a problem. Our entire web application runs on PHP, which has its own drawbacks when it comes to the amount of traffic it can handle and the resources it consumes to run different PHP-FPM processes.</p><p>To address this issue, we decided to <strong>reroute the webhook responses from the WhatsApp Cloud API to a microservice</strong>. This microservice was configured to run a GoLang script. Its primary task was to handle all the responses from WhatsApp, process the status responses (since our application logic doesn’t depend on them), and send all other responses to our main server EC2 instance.</p><figure><img alt="Internshala to WhatsApp to Microservice request-response flow" src="https://cdn-images-1.medium.com/max/1024/1*unKHMNu1hjXiWRSBqU3fzQ.gif" /></figure><p>Here’s how it works:</p><ol><li><strong>Microservice Handling Status Responses:</strong> The microservice processes all status responses and sends them to an S3 data lake using AWS Kinesis Firehose instead of storing them in AWS RDS, which reduced the cost at the RDS level. And if we need to check the status of any message sent to users, we can easily run a query on AWS Athena and retrieve the data.</li><li><strong>Forwarding Incoming Messages:</strong> Only the incoming messages are sent from the microservice to our main server. Now the main server can efficiently handle the user’s message response and revert them back much quicker. This significantly reduced the load that was coming to our main traffic-handling servers.</li></ol><p>In conclusion, by offloading the status responses to the microservice and only forwarding the necessary incoming messages to our main servers, we achieved a substantial reduction in load. With this simple rerouting, <strong>we were able to reduce up to 75% of the load on our main server</strong> that came from WhatsApp’s webhook responses.</p><p><strong>Go-Live Date:</strong> 29th May 2024</p><p>Thank you for reading! I hope you found this article helpful. If you have any questions or suggestions, please leave a comment. Your feedback helps me improve.</p><p>Don’t forget to follow for more updates.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ec93e1fccce" width="1" height="1" alt=""><hr><p><a href="https://medium.com/internshala-tech/enhancing-server-performance-a-75-reduction-in-whatsapp-api-load-through-golang-microservice-8ec93e1fccce">Enhancing Server Performance: A 75% Reduction in WhatsApp API Load Through GoLang Microservice</a> was originally published in <a href="https://medium.com/internshala-tech">Internshala Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>