<?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 Ayush Gupta on Medium]]></title>
        <description><![CDATA[Stories by Ayush Gupta on Medium]]></description>
        <link>https://medium.com/@madmecodes?source=rss-a9efe2ae36cc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*a53COvRyergDUuQNWS_uVg.jpeg</url>
            <title>Stories by Ayush Gupta on Medium</title>
            <link>https://medium.com/@madmecodes?source=rss-a9efe2ae36cc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 22:09:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@madmecodes/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[Securing SSH the Right Way: Moving to Cloudflare Tunnel]]></title>
            <link>https://medium.com/@madmecodes/securing-ssh-the-right-way-moving-to-cloudflare-tunnel-d3e6b7fb8d86?source=rss-a9efe2ae36cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3e6b7fb8d86</guid>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Thu, 05 Feb 2026 17:47:27 GMT</pubDate>
            <atom:updated>2026-02-06T06:41:57.086Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*RuNfGuIb-B3uhQ4C0BlrVA.png" /></figure><p>As you’d know from the previous post, during <strong>Oasis</strong> we faced a serious <strong>DDoS attack on port 22 (SSH)</strong>. Once you see SSH being targeted at scale, one thing becomes clear: <strong>exposing port 22 to the public internet is asking for trouble</strong>.</p><p>So the question was simple, how do we secure SSH properly?</p><p>We explored a few options:</p><ul><li>Allow SSH only from personal IPs</li><li>Restrict access to campus or office networks</li><li>Use DigitalOcean’s firewall rules more aggressively</li></ul><p>But none of these were reliable. Mobile networks inside the university are slow and inconsistent, and university Wi-Fi sits behind shared local routers, making IP-based access impractical. We needed something secure, flexible, and workable.</p><p>The Solution: Cloudflare SSH Tunneling</p><p>That’s when we moved to <strong>Cloudflare Tunnel</strong> for SSH access.</p><p>Instead of exposing port 22 at all, the server establishes an <strong>outbound connection</strong> to Cloudflare. SSH access is then routed through Cloudflare with <strong>email-based authentication</strong>. No public SSH port. No random scanners. No brute-force noise.</p><p>The best part? <strong>Cloudflare’s free tier is surprisingly generous</strong>, and it was more than enough for our use case. Setup was clean, and once enabled, it worked exactly as expected.</p><p>This immediately solved our biggest concern: SSH access was now <strong>private by default</strong>.</p><p>I also made a <strong>step-by-step video</strong> covering the full setup.<br>If you want to follow along, you can find it here:<br> <a href="https://www.youtube.com/watch?v=Uz__NfiYrus&amp;t=32s">https://www.youtube.com/watch?v=Uz__NfiYrus&amp;t=32s</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jtnc2S84dxsVCtQ5b3JQpg.png" /></figure><h3>Going a Bit Deeper: Why It Works So Well</h3><p>While setting this up, I ended up learning more about how Cloudflare handles traffic under the hood — especially its use of <strong>HTTP/3 (QUIC)</strong>.</p><p>Earlier versions of HTTP had limitations:</p><ul><li><strong>HTTP/1</strong> opened new connections repeatedly — slow and inefficient</li><li><strong>HTTP/1.1</strong> reused connections but processed requests sequentially</li><li><strong>HTTP/2</strong> allowed parallel requests, but a single packet loss could block everything</li></ul><p><strong>HTTP/3</strong>, built on <strong>QUIC (UDP)</strong>, fixes this. Each request runs as an independent stream. If one stream faces packet loss, others continue unaffected. This makes it far more resilient — exactly what you want for tunneling and secure access.</p><p>It’s easy to see why Cloudflare relies on it.</p><h3>Final Thoughts</h3><p>No exposed ports, no IP juggling, and access controlled via identity instead of network location.</p><p>During high-traffic events like Oasis, this setup gave us peace of mind — and that matters more than any clever firewall rule.</p><p>If you’re still exposing SSH directly to the internet, this is one of those changes that’s <strong>small in effort but massive in impact</strong>. Your future self (and your servers) will thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3e6b7fb8d86" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fixing Log Chaos: Implementing Grafana Loki in a Production Setup]]></title>
            <link>https://medium.com/@madmecodes/fixing-log-chaos-implementing-grafana-loki-in-a-production-setup-cd59176f6846?source=rss-a9efe2ae36cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd59176f6846</guid>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Thu, 05 Feb 2026 17:46:57 GMT</pubDate>
            <atom:updated>2026-02-05T17:46:57.038Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oKx7B7_l6rQHJwMheLEDMQ.jpeg" /></figure><p>I’m part of the <strong>Department of Visual Media (DVM)</strong> at <strong>BITS Pilani</strong>, one of India’s premier engineering colleges. DVM designs and operates the technical infrastructure for major campus events like <strong>Oasis</strong>, the annual cultural fest, and <strong>Apogee</strong>, the flagship technical fest, along with several college-wide projects year-round. One thing you learn quickly while running systems at this scale: <strong>server bills are often the hardest problem to optimize</strong>.</p><p>To serve a <strong>5,000+ active user base</strong>, we follow a <strong>single-server–first approach</strong> on <strong>DigitalOcean</strong> — simply because it’s the most cost-effective option. Domains and subdomains are managed via <strong>Cloudflare</strong>, sitting behind its <strong>WAF</strong>, with <strong>SSH tunneling</strong> enabled for security.</p><p>On the server side, <strong>Nginx</strong> is configured with <strong>project-based subdomain routing</strong>, each mapped to a specific <strong>Docker container</strong>. Most backends are built with <strong>Django</strong>, everything is <strong>containerized</strong>, orchestrated using <strong>Docker Compose</strong>, and backed by <strong>PostgreSQL</strong>.</p><p>By this point, you can probably guess the problem.</p><h3>The Problem: Too Many Containers, Too Little Visibility</h3><p>We had <strong>a lot of containers</strong> running at any given time. When something broke, debugging usually meant:</p><ul><li>Checking individual Docker container logs</li><li>Digging through Nginx access and error logs</li><li>Using htop, iftop, docker stats for quick insights</li><li>SSHing in and tailing logs manually — again and again</li></ul><p>It worked, but it was <strong>tedious</strong>, slow, and easy to miss things — especially under pressure. During events like Oasis, when traffic spikes and attacks happen, this approach simply doesn’t scale.</p><p>I wanted <strong>one place</strong> to see everything.</p><h3>The Solution: A Simple, Containerized Observability Stack</h3><p>So I decided to integrate <strong>Grafana Loki</strong>, along with a lightweight observability stack:</p><ul><li><strong>Prometheus</strong> for metrics collection</li><li><strong>Node Exporter</strong> for host-level system metrics</li><li><strong>cAdvisor</strong> for container resource monitoring</li><li><strong>Promtail</strong> to collect and ship logs</li><li><strong>Loki</strong> for log aggregation</li><li><strong>Grafana</strong> as the single visualization layer</li></ul><p>All of it ran as <strong>containers</strong>. No system-wide installs, no host pollution — spin it up and it just works.</p><p>Within a few hours, I had <strong>one dashboard</strong> showing:</p><ul><li>System CPU, memory, and disk usage</li><li>Per-container resource consumption</li><li>Centralized logs from Docker and Nginx</li><li>Historical data instead of just “what’s happening right now”</li></ul><h3>What Changed</h3><p>The difference was immediate.</p><p>Instead of running multiple commands and SSHing around:</p><ul><li>I could <strong>select a container and instantly stream logs</strong></li><li>Filter logs by <strong>status codes, services, or labels</strong></li><li>Correlate <strong>traffic spikes with CPU usage</strong></li><li>Spot patterns that were invisible in raw log files</li></ul><p>LogQL made querying logs straightforward<br>({job=&quot;nginx&quot;} | json | status=500),<br>and PromQL handled metrics cleanly<br>(rate(requests_total[5m])).</p><p>One note: <strong>cAdvisor is resource-heavy</strong>. Under high load, it can be worth disabling it and relying mainly on <strong>Loki + Promtail</strong>. Logs usually give more actionable insight than fine-grained container metrics — and Loki’s overhead is minimal.</p><p>During high-traffic events like <strong>Oasis</strong>, this single dashboard was a lifesaver — cutting down manual effort and giving much clearer visibility. We used it live under load, and it genuinely improved how we understood and handled observability.</p><p>Less chaos. More clarity.<br>And definitely fewer late-night log-tailing sessions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd59176f6846" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSOC’25 Kubeflow: Securing and Optimizing ML Infrastructure with Istio]]></title>
            <link>https://medium.com/@madmecodes/gsoc25-kubeflow-securing-and-optimizing-ml-infrastructure-with-istio-31f535c77fd6?source=rss-a9efe2ae36cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/31f535c77fd6</guid>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cncf]]></category>
            <category><![CDATA[kubeflow]]></category>
            <category><![CDATA[gsoc-2025]]></category>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Thu, 09 Oct 2025 17:45:20 GMT</pubDate>
            <atom:updated>2025-10-25T17:44:32.850Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*hmmTlSKizXfyuurPNHvAAw.png" /></figure><h3>My Google Summer of Code 2025 Journey with Kubeflow: Securing and Optimizing ML Infrastructure with Istio</h3><p><strong>Author:</strong> Ayush Gupta (@madmecodes)<br> <strong>Organization:</strong> Kubeflow (Google Summer of Code 2025)<br> <strong>Project: </strong>Istio CNI and Ambient Mesh</p><p>Mentors: Julius von Kohout (github: juliusvonkohout) , Kimonas Sotirchos (github: kimwnasptd)</p><h3>Quick Links</h3><p><strong>All My Contributions:</strong> <a href="https://github.com/kubeflow/manifests/pulls?q=is%3Apr+author%3Amadmecodes+">View all PRs on GitHub</a></p><p><strong>Cross-Repository Work:</strong></p><ul><li><a href="https://github.com/kubeflow/dashboard/pull/127">Dashboard #127 — Ambient Support</a></li><li><a href="https://github.com/kubeflow/notebooks/pull/628">Notebooks #628 — Ambient Support</a></li><li><a href="https://github.com/kubeflow/pipelines/pull/11750">Pipelines #11750 — Sidecar Injection Fix</a></li><li><a href="https://github.com/kubeflow/model-registry/pull/869">Model Registry #869 — Sidecar Injection Fix</a></li></ul><h3>Table of Contents</h3><ol><li>Introduction: Why This Project Matters</li><li>Understanding Kubeflow: The ML Platform</li><li>What is Istio and Why Kubeflow Needs It</li><li>The Problem: Security and Resource Overhead</li><li>Service Mesh Evolution: From Sidecars to Ambient</li><li>My Contributions: The Journey Through 25+ PRs</li><li>What I Learned</li><li>Acknowledgments</li></ol><h3>Introduction: Why This Project Matters</h3><p>When I first joined <strong>Kubeflow</strong> for <strong>Google Summer of Code 2025</strong>, I didn’t fully grasp the complexity of running machine learning platforms at scale. I knew <strong>Kubernetes</strong>, had worked with Docker, and understood the basics of microservices. But the intricate dance between security, performance, and usability in a <strong>multi-tenant ML</strong> environment? That was a whole new world.</p><p>My project aimed to solve three critical problems:</p><ol><li><strong>Security</strong>: Kubeflow’s default installation required privileged containers, violating Kubernetes Pod Security Standards</li><li><strong>Authentication</strong>: KServe inference endpoints were exposed without proper security</li><li><strong>Resource Efficiency</strong>: Traditional service mesh architecture consumed excessive memory and CPU</li></ol><p>Over the summer, I submitted <strong>25+ pull requests</strong> across multiple Kubeflow repositories, touching everything from core authentication flows to cutting-edge service mesh architectures. This is the story of that journey.</p><h3>Understanding Kubeflow: The ML Platform</h3><p><strong>Kubeflow</strong> is an open-source <strong>MLOps</strong> platform that transforms Kubernetes into a complete machine learning cloud. Think of it as the infrastructure that powers ML workflows for teams — from data scientists training models to engineers deploying them in production.</p><p>Kubeflow allows you to:</p><ul><li><strong>Train models</strong> at scale using distributed training frameworks</li><li><strong>Build ML pipelines</strong> for reproducible workflows</li><li><strong>Deploy models</strong> for inference with KServe</li><li><strong>Run notebooks</strong> in isolated, secure environments</li><li><strong>Optimize hyperparameters</strong> with Katib</li><li><strong>Manage experiments</strong> across teams</li></ul><p>Each user or team operates in their own namespace, ensuring isolation and security. But coordinating all these components — <strong>Pipelines, Notebooks, KServe, Katib, Central Dashboard </strong>— requires sophisticated networking and security controls.</p><p>That’s where Istio comes in.</p><h3>What is Istio and Why Kubeflow Needs It</h3><p><strong>Istio</strong> is a <strong>service mesh</strong> — a dedicated infrastructure layer that manages how microservices communicate. In a platform as complex as Kubeflow, you need:</p><ul><li><strong>Secure communication</strong> (mTLS between all services)</li><li><strong>Observability</strong> (metrics, tracing, logging)</li><li><strong>Traffic management</strong> (intelligent routing, retries, timeouts)</li><li><strong>Policy enforcement</strong> (who can access what)</li></ul><p>Without Istio, managing these concerns across dozens of microservices would be nearly impossible. Imagine manually configuring TLS certificates for every service, writing custom load balancers, and debugging network failures without trace data. Istio automates all of this.</p><p><strong>How Kubeflow Uses Istio:</strong></p><ul><li>The <strong>Istio Gateway</strong> exposes Kubeflow to external users</li><li><strong>Virtual Services</strong> route requests to the right components</li><li><strong>Authorization Policies</strong> enforce who can access notebooks, pipelines, and models</li><li><strong>Mutual TLS</strong> encrypts all inter-service communication</li></ul><h3>The Problem: Security and Resource Overhead</h3><p>Despite Istio’s benefits, Kubeflow’s default installation had serious issues:</p><h3>Security Gaps</h3><p><strong>Privileged Init Containers</strong>:<strong> Traditional Istio</strong> uses privileged init containers to configure pod networking. This:</p><ul><li>Violates Kubernetes Pod Security Standards (PSS)</li><li>Creates security risks in enterprise environments</li><li>Blocks adoption in regulated industries</li></ul><p><strong>Unsecured Inference Endpoints</strong>: KServe model serving endpoints were accessible without authentication, meaning anyone with network access could query your models.</p><h3>Resource Overhead</h3><p><strong>Sidecar Explosion</strong>: Every pod gets an Envoy sidecar proxy. In a deployment with:</p><ul><li>1,000 user namespaces</li><li>10 pods per namespace</li><li>That’s <strong>10,000 sidecars</strong>, each consuming ~50–100MB memory</li></ul><p>This translates to:</p><ul><li><strong>~500GB-1TB</strong> just for proxies</li><li>Increased CPU usage for proxy processing</li><li>Higher network latency due to extra hops</li><li>Complex upgrade procedures (must restart all pods)</li></ul><p>For ML workloads that are already resource-intensive, this overhead is painful.</p><h3>Service Mesh Evolution: From Sidecars to Ambient</h3><p>Istio’s architecture has evolved significantly to address these challenges:</p><h3>Traditional Istio (Sidecar-Based)</h3><p>Every pod gets its own Envoy proxy injected as a sidecar container. Traffic flows: Pod → Sidecar → Network → Sidecar → Pod</p><p><strong>Pros</strong>: Fine-grained control, strong isolation<br> <strong>Cons</strong>: High resource usage, complex lifecycle management</p><h3>Istio CNI</h3><p>Moves network configuration from privileged init containers to a CNI plugin running at the node level.</p><p><strong>Pros</strong>: No privileged containers in user pods, better security<br> <strong>Cons</strong>: Still uses sidecars, requires CNI plugin installation</p><h3>Istio Ambient Mesh (The Future)</h3><p>Removes sidecars entirely, using:</p><ul><li><strong>ztunnel</strong> (L4 proxy) running at the node level for basic traffic handling and mTLS</li><li><strong>Waypoint proxies</strong> (L7 proxy) deployed per-namespace only when advanced features are needed</li></ul><p><strong>Pros</strong>: Minimal resource overhead, simpler operations, no pod restarts for upgrades<br> <strong>Cons</strong>: Beta technology, requires Gateway API</p><h3>My Contributions</h3><p>Let me walk you through the major milestones of my GSoC journey:</p><h3>Phase 1: Foundation</h3><h4><a href="https://github.com/kubeflow/manifests/pull/3044">PR #3044: Fix Istio Sidecar Injection</a></h4><p>My first major contribution addressed a fundamental issue — Istio sidecar injection was using deprecated annotations. I migrated to the recommended label-based approach, but this required coordinating across <strong>four repositories</strong>:</p><ul><li><a href="https://github.com/kubeflow/katib/pull/2527">Katib PR #2527</a></li><li><a href="https://github.com/kubeflow/model-registry/pull/869">Model Registry PR #869</a></li><li><a href="https://github.com/kubeflow/pipelines/pull/11750">Pipelines PR #11750</a></li><li><a href="https://github.com/kubeflow/kubeflow/pull/7708">Kubeflow Core PR #7708</a></li></ul><p>This taught me that changes in large projects ripple across codebases. You can’t just update one repo — you need to coordinate timing, handle version compatibility, and ensure nothing breaks.</p><h4><a href="https://github.com/kubeflow/manifests/pull/3048">PR #3048: Spark Operator Sync Script</a> Merged</h4><p>Created an automated synchronization script to keep Spark Operator manifests updated, reducing manual maintenance burden.</p><h3>Phase 2: Security Deep Dive</h3><h4><a href="https://github.com/kubeflow/manifests/pull/3056">PR #3056: Document Secure KServe Authentication</a></h4><p>KServe inference endpoints — where you deploy your trained models — were unsecured. Anyone with cluster access could query them. I:</p><ul><li>Implemented <strong>OAuth2-proxy authentication</strong></li><li>Created comprehensive automated tests</li><li>Documented security architecture</li><li>Validated multi-tenant isolation</li></ul><h4><a href="https://github.com/kubeflow/manifests/pull/3079">PR #3079: Fix JWT Issuer Configuration</a></h4><p><strong>Service</strong> account tokens were failing with <strong>“JWT issuer is not configured”</strong> errors. This was blocking authentication flows across the platform. The fix required deep understanding of Kubernetes service account token projection and <strong>Istio’s JWT validation</strong>.</p><h4><a href="https://github.com/kubeflow/manifests/pull/3180">PR #3180: KServe Enforce Authentication</a></h4><p>Building on PR #3056, this massive PR enforced authentication across <strong>all</strong> KServe endpoints using comprehensive AuthorizationPolicies. This was the culmination of weeks of security work, ensuring no inference endpoint could be accessed without proper credentials.</p><h3>Phase 3: Testing and Reliability</h3><h4><a href="https://github.com/kubeflow/manifests/pull/3082">PR #3082: Fix Flaky Dex Login Test</a></h4><p>Our Dex authentication tests would randomly fail due to race conditions and improper error handling. I:</p><ul><li>Added proper 403 error handling</li><li>Improved authentication flow logic</li><li>Made tests deterministic</li></ul><h4><a href="https://github.com/kubeflow/manifests/pull/3084">PR #3084: Fix 404 DNS Error</a></h4><p>A simple but frustrating bug — developers kept hitting <strong>404</strong> errors in local development. The fix? Adding example.com to the <strong>Knative serving patch.</strong> Sometimes the smallest PRs have the biggest developer experience impact.</p><h4><a href="https://github.com/kubeflow/manifests/pull/3086">PR #3086: Remove KServe DNS Patches</a></h4><h4><a href="https://github.com/kubeflow/manifests/pull/3120">PR #3120: Refactor KServe Tests</a></h4><p>Cleaned up technical debt by removing unnecessary DNS patches and reorganizing test structure for better maintainability.</p><h3>Phase 4: The Istio Migration</h3><h4><a href="https://github.com/kubeflow/manifests/pull/3153">PR #3153: Migrate to Istio 1.26.1 &amp; Merge CNI</a></h4><p>This was <strong>huge</strong>. Upgrading Istio is never trivial, but we also consolidated the separate Istio and Istio CNI installations into a unified setup. The PR required:</p><ul><li>Testing every Kubeflow component with the new version</li><li>Updating dozens of configuration files</li><li>Ensuring backward compatibility</li><li>Validating security policies still worked</li></ul><h4><a href="https://github.com/kubeflow/manifests/pull/3135">PR #3135: Switch to Istio CNI by Default</a></h4><p>Made Istio CNI the <strong>default installation method</strong>, eliminating privileged init containers. This was a major security milestone — Kubeflow now complies with Kubernetes <strong>Pod Security Standards</strong> out of the box.</p><h4><a href="https://github.com/kubeflow/manifests/pull/3206">PR #3206: Limit Istio Sidecar Scope</a></h4><p>A performance optimization that limits what each sidecar needs to know about. By restricting the Istio discovery scope, we significantly reduced memory consumption in multi-namespace deployments.</p><h3>Phase 5: KServe Innovation</h3><h4><a href="https://github.com/kubeflow/manifests/pull/3148">PR #3148: KServe Path-Based Routing</a></h4><p>Implemented path-based routing for KServe, allowing multiple models to be served through intuitive URL paths like /v1/models/my-model/predict. This was crucial for supporting multi-model serving scenarios elegantly.</p><h4><a href="https://github.com/kubeflow/manifests/pull/3247">PR #3247: VirtualService Conflict Troubleshooting</a></h4><p>Created comprehensive troubleshooting documentation for common VirtualService conflicts. Documentation is code too!</p><h3>Phase 6: The Ambient Mesh Revolution</h3><h4><a href="https://github.com/kubeflow/manifests/pull/3246">PR #3246: Add Istio Ambient Mode Support</a></h4><p>This is the <strong>crown jewel</strong> of my GSoC project. Istio Ambient Mesh represents a paradigm shift in service mesh architecture. My implementation includes:</p><p><strong>Core Changes:</strong></p><ul><li>Ambient Mesh installation via overlay method using Kustomize</li><li>ztunnel deployment for L4 traffic handling</li><li>Waypoint proxy configuration for L7 policy enforcement</li><li>Migration from VirtualService to Gateway API (HTTPRoute)</li></ul><p><strong>Cross-Repository Work:</strong></p><ul><li><a href="https://github.com/kubeflow/dashboard/pull/127">Dashboard PR #127</a> — Gateway API routing</li><li><a href="https://github.com/kubeflow/kubeflow/pull/7736">Kubeflow Core PR #7736</a> — Profile controller updates</li><li><a href="https://github.com/kubeflow/notebooks/pull/628">Notebooks PR #628</a> — Waypoint compatibility</li></ul><h4><a href="https://github.com/kubeflow/manifests/pull/3254">PR #3254: Consolidate KServe Test Workflows</a></h4><p>Currently consolidating multiple KServe test workflows into a single job to reduce CI/CD complexity and improve execution time.</p><h3>What I Learned</h3><p>This GSoC experience was transformative. Here’s what I gained:</p><h3>Technical Deep Dives</h3><p><strong>Istio Mastery</strong>: I went from understanding “Istio is a service mesh” to knowing the intricate differences between sidecar injection, CNI mode, and Ambient architecture. I learned:</p><ul><li>When to use each mode and why</li><li>How mTLS is established at L4 vs L7</li><li>The trade-offs between VirtualService and Gateway API</li><li>Performance implications of different proxy configurations</li></ul><p><strong>Kubernetes Kustomize</strong>: Working with Kubeflow taught me the power of <strong>Kustomize overlays</strong>. The ability to:</p><ul><li>Define <strong>base</strong> configurations</li><li>Create modular <strong>overlays</strong> for different deployment scenarios</li><li>Compose complex installations from simple <strong>components</strong></li></ul><p>This is the “right way” to manage Kubernetes configurations at scale.</p><p><strong>Service Mesh Patterns</strong>: I discovered the ecosystem around service meshes:</p><ul><li><strong>Knative</strong> for serverless workloads and auto-scaling</li><li><strong>KServe</strong> for ML model serving with intelligent routing</li><li><strong>Path-based routing</strong> for multi-model endpoints</li><li><strong>Gateway API</strong> as the future of Kubernetes ingress</li></ul><p><strong>Security Best Practices</strong>: Implementing enterprise-grade security taught me:</p><ul><li>Kubernetes Pod Security Standards (baseline, restricted)</li><li>Multi-tenant isolation in shared clusters</li></ul><h3>Open Source Collaboration</h3><p><strong>Weekly Meetings Were Gold</strong>: Our frequent weekly sync-ups with mentors were invaluable. They helped me:</p><ul><li>Stay unblocked when hitting complex issues</li><li>Learn best practices for open-source collaboration</li><li>How to give constructive feedback</li></ul><p><strong>Documentation Matters</strong>: Code is only half the story. I learned that:</p><ul><li>Clear README updates help onboard new users</li><li>Troubleshooting guides save countless support hours</li><li>Architecture diagrams clarify complex systems</li><li>Migration guides ease the transition for existing users</li></ul><h3>Acknowledgments</h3><p>This journey wouldn’t have been possible without an incredible support system:</p><p><strong>To My Mentors</strong>: Thank you for the <strong>weekly meetings</strong> that kept me on track, the patient explanations when I was confused, and the encouragement when I faced setbacks. Your guidance transformed me from a contributor to a confident open-source developer.</p><p>My mentors were exceptional throughout this GSoC journey. They were incredibly helpful, patient, and polite, even when I made mistakes or asked questions that might have seemed basic.</p><p>The weekly meetings were instrumental in my success, providing guidance, unblocking technical challenges, and helping me understand the broader architectural decisions behind each change.</p><p>Special thanks to Julius von Kohout, who has been extraordinarily supportive from the very beginning of the GSoC period. He’s incredibly active, responds thoughtfully to every PR comment (even on PRs with 79+ comments!), and always takes time to explain the “why” behind decisions. His deep knowledge of Istio, Kubernetes security, and Kubeflow architecture was invaluable. Julius provided clear direction while encouraging me to think critically and learn. His mentorship went beyond code reviews – he taught me how to be a better open-source contributor. I truly respect his activeness and commitment to both the project and mentoring contributors. Working with Julius has been one of the highlights of my GSoC experience.</p><p>I would also like to thank Kimonas and Orfeas for always being ready to help with my queries and guiding me whenever I was stuck. They were consistently helpful and always encouraged me to ping them freely on Slack if I had any doubts.</p><p><strong>To the Kubeflow Maintainers</strong>: Your thorough code reviews (even the ones with 50+ comments) taught me more than any tutorial could. Thank you for maintaining high standards while being welcoming to new contributors.</p><p><strong>To the Istio Community</strong>: Your documentation and examples were invaluable, especially when working with beta features like Ambient Mesh.</p><p><strong>To Google Summer of Code</strong>: Thank you for creating a program that gives students real-world experience on projects that matter. This wasn’t just an internship — it was a transformative learning experience.</p><p><strong>To the Kubeflow Community</strong>: The welcoming atmosphere, the Slack discussions, the collaborative spirit — you’ve created something special. I’m proud to be part of it.</p><h3>Final Thoughts</h3><p>When I started GSoC, I thought I’d be writing some code and learning about Kubernetes. I didn’t expect to:</p><ul><li>Make 25+ meaningful contributions</li><li>Work on cutting-edge service mesh technology</li><li>Coordinate changes across multiple repositories</li><li>Impact the security posture of a platform used by thousands</li><li>Discover a passion for cloud-native infrastructure</li></ul><p>Kubeflow showed me that <strong>ML infrastructure is just as exciting as ML algorithms</strong>. Someone has to build the platforms that data scientists use, and now I know that “someone” can be me.</p><p>The world of service meshes, Kubernetes security, and MLOps is vast and constantly evolving. Istio Ambient Mesh is just the beginning — there’s so much more to explore and optimize.</p><p>If you’re interested in Kubeflow, service mesh architecture, or just want to chat about my GSoC experience, I’d love to connect!</p><h3>Connect With Me</h3><ul><li><strong>GitHub</strong>: <a href="https://github.com/madmecodes">@madmecodes</a></li><li><strong>LinkedIn</strong>: <a href="https://www.linkedin.com/in/ayush-gupta-dev/">Ayush Gupta</a></li></ul><p><em>This article documents my Google Summer of Code 2025 journey with Kubeflow. All code contributions are open source and available on GitHub. If this inspired you to contribute to open source, start with Kubeflow — the community is incredibly welcoming!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31f535c77fd6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[E-commerce Project In MicroServices: BITSHOP: PART-1 Design/Approach!]]></title>
            <link>https://medium.com/@madmecodes/e-commerce-project-in-microservices-bitshop-part-1-design-approach-8ae9904621cf?source=rss-a9efe2ae36cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ae9904621cf</guid>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Mon, 24 Jun 2024 14:24:54 GMT</pubDate>
            <atom:updated>2024-06-24T14:24:54.687Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi everyone, I’m excited to share my E-commerce project on microservices architecture. Dividing it into 2 parts, first consist of The Design, methodology , approach whatever you say and second one will be about hands on code and project demo.</p><p>The topics to be discussed:</p><ol><li>Overview of the project</li><li>Design Paradigm</li><li>Tech Stack (Brief)</li><li>Use Case Diagram</li><li>Sequence Diagram</li><li>System Requirements and capacity estimation</li><li>High Level System Design</li><li>Database Design</li><li>API endpoints</li><li>Quick Code Walk through (PART-2)</li><li>Cloud Architecture (PART-2)</li><li>Project Demo (PART-2)</li></ol><h3><strong>Overview of the Project</strong></h3><p>The Project on the macro level comprises of 7 main services:</p><ol><li>A website for buyers. (React + GO)</li><li>Website for the sellers. (React + GO)</li><li>An Admin Dashboard. (Django)</li><li>Delivery System. (React-native + GO)</li><li>Ratings based on block chain. (Solidity)</li><li>Live Support Service. (Nodejs/TypeScript)</li><li>Scalable Notification Service (GO)</li></ol><p>Third party Services in the project are:</p><ol><li>Payment Service</li><li>Google Maps</li></ol><p>From User side General flow of the system will be:</p><ol><li>Add/update the products.</li><li>Search for products by their name or category.</li><li>Add/remove product items in the shopping cart/wish-list.</li><li>Check-out to buy product items in the shopping cart.</li><li>Make a payment to place an order.</li><li>Send notifications to respective vendor and rider.</li><li>Track the order status.</li><li>Add a new product category.</li></ol><p>Now lets talk about the Design Paradigm of our system.</p><h3><strong>Design Paradigm</strong></h3><p>We will be adopting the Hexagonal architecture, also known as Ports and Adapters architecture, for our project. This approach ensures that our system remains modular, allowing us to easily integrate or remove services as needed. By keeping the business layer separate, we maintain a clear separation of concerns and facilitate the flexibility required for future enhancements and modifications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fd3hUX-4PpYKCs4gD1yUnA.png" /></figure><p>(Hexagonal architecture is a specialized form of clean architecture, focusing on a specific approach to achieving clean separation between the core application logic and external systems.)</p><p>Recommended: <a href="https://netflixtechblog.com/ready-for-changes-with-hexagonal-architecture-b315ec967749">https://netflixtechblog.com/ready-for-changes-with-hexagonal-architecture-b315ec967749</a></p><h3><strong>Tech Stack</strong></h3><p><strong>APIs covered in this project includes:</strong></p><ol><li>GraphQl (searching filtering)</li><li>gRPC (in between microservices)</li><li>REST (client to backend)</li><li>Websockets (chat)</li><li>webRTC (video)</li></ol><p><strong>Languages and Frameworks:</strong></p><ol><li>Django for Admin page as its default admin page and ORM makes easier integration of all databases in a single UI</li><li>React for building websites</li><li>React Native for Riders App</li><li>Nodejs for Live communication support (Websockets and webRTC)</li><li>Go for building rest of the web servers</li></ol><p><strong>Databases and caching systems</strong>: (we will discuss more on HLD)</p><ul><li>Postgres | Redis | MongoDb | ElasticSearch | S3 | Cassandra</li></ul><p>Since our micro services architecture is event driven we will be using <strong>message queuing services</strong>, we will use both</p><ol><li>RabbitMQ</li><li>Kafka</li></ol><p>Since also decided to integrate <strong>Ratings system on blockchain</strong> we will be using:</p><ol><li>Solidity (will look more)</li></ol><p>Plus+</p><ul><li>For <strong>Data Engineering and Data Science</strong>: Spark, Hadoop, python</li><li>For <strong>Devops</strong>: GitHub Actions(CI/CD), Grafana,loki, Kubernetes(EKS), ECS, Terraform, other AWS services…</li><li>I’m a little confused right now about whether to use open source or fully dive into AWS. Will figure this out with time.</li><li>Also once half-way done will make two enviornments; one dev and other prod and would use deployment strategies like canary deployment.</li></ul><p><strong>Use Case Diagram</strong></p><p>Okay so i dont know whether these diagrams make sense, but i was going through it; and i have created the following diagrams:</p><p>We have 5 main Actors in our System:</p><ol><li>User: Searches items, adds/removes them to/from cart or wishlist, checks out, tracks the order status, logs in/out, adds ratings to products or riders, and views order history.</li><li>Admin: A super admin who has full control over all the databases and services, can also create other respective admin roles for shipment, Customer, payment, category, report, and system.</li><li>Seller: Can log in/out, add/remove/update products in inventory, upload a video/image demonstrating products, add support service in case of discrepancy, and view sales reports/analytics.</li><li>Rider: Can log in/out, be idle or on a ride, confirm/reject a delivery, and receive payment upon delivery.</li><li>System: Provides recommendations based on user behavior, offers notification services, ensures service accessibility (only products that can be delivered), estimates time of arrival (ETA), calculate shipment cost, and logs and monitors the system.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w3QU3fPHeeFPEgIHnV9R4g.png" /></figure><h3><strong>Sequence Diagrams</strong></h3><p>In the sequence diagrams, I have added the general flow of the system. To delve into the nitty-gritty of the project, we will examine the HLD and API endpoints. (We will update the textual flow to include API endpoints in the future.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*OfBSmTM0oo63o5DsTSmiWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e0x4ksb57FMf_xOg4vuWCA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7_Xbw3AY-M2wc-CjskqCig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rOGUBGCUXrupH2NS13wPdQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pcn1q7RHGFN0UFbPJBq2DQ.png" /></figure><h3>System Requirements and Capacity Estimation:</h3><p><strong>Functional Requirements</strong></p><ol><li>Authentication System</li><li>Search and Filtering with Estimated Delivery Time and Estimated Delivery Cost</li><li>Recommendation System for user Homepage</li><li>Cart and Wishlist service</li><li>Orders History</li><li>Rating System (based on blockchain)</li><li>Logistics (allocate a delivery rider with Estimated Delivery and cost)</li><li>Order Tracking</li><li>Notification Service: send notifications to User, seller and rider; pluggable and extendable with prioritization.</li><li>Live Communication Support: built-in 1 to 1 video calls and chat. (no group call)</li><li>Inventory Management</li><li>Seller Can also upload videos compatible with all devices.</li><li>Role-based Admin Access Control</li><li>Data Engineering (Data ingestion and processing pipelines)</li><li>Data Analysis (Sales, revenue, Customer behavior)</li></ol><p><strong>External Services</strong></p><ol><li>Payment Service (webhook, third party)</li><li>Google Maps service (third party)</li></ol><p><strong>Non-Functional Requirements</strong></p><ol><li>Usability and Accessibility</li><li>Performance and Responsiveness</li><li>Security</li><li>Reliability and High Availability</li><li>ACID Properties on Order/Payment</li><li>Analytics and Reporting</li><li>System Monitoring and logging</li><li>Devops (CI/CD + kubernetes environment)</li><li>Scalabality</li><li>Deployment Strategy (Canary Deployment)</li><li>Circuit Breaking (in some of the service)</li><li>Test cases</li><li>Live Video Call: super fast, low latency not enough, data loss is ok.</li></ol><p><strong>Capacity Estimation</strong></p><p>We will be evaluating Capacity based on 4 parameters (traffic, storage, bandwidth and memory) for our buyer, seller, rider, admin, support, notification and ratings.</p><p>Since we will be dealing in an dockerised environment (orchestrated by Kubernetes) we have to delve into the nitty-gritty of each service to know its specific requirements…</p><p>// to be updated, once code resumes.</p><h3>High Level System Design</h3><p>(See Video(PART-2) for complete flow, inspiration from Codekarle)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UbWR1OT_2OZ_O7K_o5P-ig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*_4tsg1Hi0HnT6W-SifT0Ig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*RKNJEQRPdvDazsygJOmtJQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uf7LeIaCV6u5iTXY_3Q7BQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n7u6YJoBDWZvtNVTCeu4Hg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9oSBDcndwWx0s6dBjgTdmQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9FH3KGf3KKQFjpphmXb7ug.png" /></figure><h3>Database Design</h3><p>Since we will be implementing a database-per-service architecture, we need a mechanism to ensure seamless transactions across all databases, respecting the ACID properties. To achieve this, we will be referring to the SAGA design pattern.</p><p>Also to not too complicate the things for now, services which really need ACID i will try one DB for them, i mean it will be mix of Databse per service and monolith Databse, because Designing fault tolerance in database per service was a bit overwhelming and to be honest this was one the reason i left the project altogether because i was so fedup with all, new jargon terms coming on and on and then at a point it started becoming just consuming content rather than implementong so i have decided i wont make this an issue to halt the project rather if databse/service gives me trouble i will shodt to both or monolith, and will gain more knowledge later and try to make an update.</p><p><a href="https://www.baeldung.com/cs/saga-pattern-microservices">https://www.baeldung.com/cs/saga-pattern-microservices</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jKGnknDOqVQIbcrbbg4NrA.png" /></figure><h3>API endpoints</h3><p>Ok, i know we need to maintain a collection in postman where we will add all our APIs, But we need a starting point, and for that i’m using simple excel and wriing down all the necessary endpoints which will be updated as project code resumes…</p><p>(Also i will first try to make endpoints only without any frontend, frontend on react if time permits…)</p><p>Look more:</p><p><a href="https://docs.google.com/spreadsheets/d/1jPExjQ2FajJJaVdspCR2yXG7bEDq9o1LZF5THEvqD78/edit?usp=sharing">https://docs.google.com/spreadsheets/d/1jPExjQ2FajJJaVdspCR2yXG7bEDq9o1LZF5THEvqD78/edit?usp=sharing</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ae9904621cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker containers aren’t stopping!]]></title>
            <link>https://medium.com/@madmecodes/docker-containers-arent-stopping-7ee05a9924d4?source=rss-a9efe2ae36cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ee05a9924d4</guid>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Sun, 23 Jun 2024 11:06:44 GMT</pubDate>
            <atom:updated>2024-06-23T11:06:44.755Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y3YBk4f6r9ykQ-wspswJ4g.png" /></figure><p>Recently, I was facing a problem in Docker.</p><p>After running docker compose up, it seemed like the containers were out of my control. Ctrl+C, Ctrl+D/X, sudo kill -9 &lt;pid&gt;, reinstalling Docker.</p><p>I tried everything, but these containers had a different plan. They wouldn’t terminate and kept running continuously. I looked on Google, tried GPT, and still, the containers were stubborn.</p><p>I really gave up. This story started months ago, probably in early April.</p><p>At that time, the containers used to take 500–600 seconds to stop on average, so I usually avoided running them and worked in localhost mostly.</p><p>Also If docker, 10 min for some reason didn’t sound a bottleneck, so i also took it lite at that time. (though I shouldn’t have, as ideally, containers take 10sec to stop).</p><p>But this week, they just blew my mind. Containers took a bloody 4000 seconds, not once, but every time I ran from that directory. I was so done with it. I even decided it was time to switch to a new OS. I’m done with Fedora, bye! It has become highly inefficient now.</p><p>The Solution!</p><p>Literally, I had no plans, not a single thought in my brain to rectify Docker. I was just messing around with Linux commands based on an LFCS course. I was looking into firewallD, how it works and all, and when I opened it, it didn’t start. I was like, what? Why is this service disabled? I opened the journalctl and noticed a weird thing — Docker was there!</p><p>What actually happened was Docker’s network was clashing with my host network. Ideally, it should create a separate network and operate there, away from the host network. I was also messing with iptables at that time, and something might have gone wrong there unknowingly, which might have caused the issue.</p><p>Also I Finally opened Docker’s logs, it said, “unable to find plugin loki.” Damn, I guess I was using Loki back in March. So Docker was continually looking for that and not able to find one, giving timeouts. I checked out /etc/docker/daemon.json and saw Loki was there. (This file doesn’t get deleted on Docker delete.)</p><p>I rectified the issue, today only, tried and the containers stopped within 10 seconds, blazingly fast!</p><p>So yeah its solved now, containers are back in control of Orchestrator madme haha, and i would like to apologies to fedora, my bad.</p><p>Looking back, honestly, I would have known the issue much earlier if I had opened “journalctl” rather than Googling and using GPT. It was my oversight, too, and I could have resolved the issue at that time.</p><p>But let’s be honest, copy-pasting the error is the new trend — just copy all, paste all, and wait for a response. I was too lazy to debug and check the logs myself. Switching to localhost sounded more interesting than debugging. Bad though, will take it into consideration next time.</p><p>Uff, what I was doing and what I found!</p><p>So, have you ever come across a solution when you were doing something else and accidentally found that it might be the issue causing that problem?</p><p><a href="https://www.linkedin.com/feed/hashtag/?keywords=day15&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7210598712258023424">#day15</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ee05a9924d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying Micro-Services in AWS!]]></title>
            <link>https://medium.com/@madmecodes/deploying-micro-services-in-aws-d66b66c1f5d2?source=rss-a9efe2ae36cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/d66b66c1f5d2</guid>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Thu, 15 Feb 2024 12:07:09 GMT</pubDate>
            <atom:updated>2024-02-15T12:27:11.337Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we will primarily focus on ECS for deploying an application based on a microservices architecture. We will explore the pros, cons, and costs associated with each approach and also discuss some alternative solutions.</p><p>Various Methods to deploy Containers in the cloud:</p><ol><li>ECS ( EC2 &amp; Fargate)</li><li>ECS with ElasticBeanStalk</li><li>EKS (Fargate and EC2)</li></ol><h3>AWS Elastic Container Service</h3><p>Amazon Elastic Container Service (ECS) is a fully managed container orchestration service provided by AWS. Key Definitions of ECS are:</p><ol><li>Container Orchestration: ECS automates the deployment and scaling of containers, making it easier to run applications in a containerized environment.</li><li>Integration with AWS Services: ECS seamlessly integrates with other AWS services, including Elastic Load Balancing (ELB), Amazon VPC, Amazon CloudWatch, and IAM.</li><li>Task Definitions: Define and configure containers using task definitions, specifying resources, network mode, and container dependencies.</li><li>Service Definitions: Create services to manage long-running applications and define scaling policies based on demand.</li><li>Cluster Management: Organize and manage containers in clusters, which can span multiple Availability Zones for high availability.</li></ol><p>ECS provides 2 types of Launch Types:</p><ol><li>ECS on EC2: Lets you run containers on a cluster of Amazon EC2 instances that you manage.</li><li>ECS with Fargate: Provides a serverless option, abstracting away the need to manage the underlying EC2 instances.</li></ol><p>Task, service &amp; cluster, Did that confused you? If you are coming from the K8s world this analogy will help you understand it better</p><ol><li>Task to Pod: A task represents the basic unit of work and is analogous to a pod in Kubernetes. A task definition in ECS defines how a set of containers work together and can be considered similar to a pod specification in Kubernetes.</li><li>Service to ReplicaSet/Deployment: Aservice is responsible for running and maintaining a specified number of tasks. This is analogous to a ReplicaSet or Deployment in Kubernetes, which ensures that a specified number of replicas (pods) are running at all times.</li><li>Cluster to Data Plane: In ECS, a cluster is a grouping of tasks and services. It can span multiple EC2 instances or Fargate instances. This can be likened to the data plane in Kubernetes, where actual workloads (pods/tasks) are deployed and managed.</li><li>ECS to Control/Master Plane: The control or master plane in Kubernetes is responsible for managing and orchestrating the deployment and scaling of pods. In ECS, this role is fulfilled by the ECS service itself, which handles task scheduling, placement, and coordination.</li></ol><p>While Creating a Cluster in ECS we are prompted with two options ECS on Fargate and ECS on EC2, what’s the difference?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZYqH0I24gUSH5QJbLLmjoQ.png" /></figure><p>With ECS on EC2 we have to choose our instance type and setup AutoScaling and Networking for our instances, we need to manage our underline infrastructure(EC2). And we are billed for the EC2 instances while in case of Fargate we are billed for the individual task being created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*j4pr9sMLCUNXa6e0Nj4Gzw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*p5vomtro1-Tuq9uuqEQ12w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hJDDzpKJdkssqUPENIW2vw.png" /></figure><p>What are Tasks?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*-wiGVc2033kc32E6xDz9kA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-QTROTbmPEtfg0NUwz0wqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4MbQjsiRByv1OJJDupLrgw.png" /></figure><p><a href="https://aws.amazon.com/blogs/containers/how-amazon-ecs-manages-cpu-and-memory-resources/"><strong>Task Size vs Container Size</strong></a><strong> (Resources CPU/RAM competition)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*otlYj6ODJPXYgCNVcs0L4w.png" /></figure><p>If a task is defined without a size in ECS on EC2, the specified containers utilize the entire resources of the EC2 instance and compete for them. However, when a task size is defined, the containers within the task cannot exceed the resources specified in the task size, even if there are additional resources available in the instance.</p><p>Defining a task size is mandatory in Fargate because billing occurs on a per-task basis. Fargate manages the placement of your tasks on a tasks/EC2 basis, ensuring there is no over or underutilization of resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*Roq7Ni23TCjeWPddgLrU3A.png" /></figure><p>Know more about Task and Containers on ECS with EC2 and Fargate: <a href="https://aws.amazon.com/blogs/containers/how-amazon-ecs-manages-cpu-and-memory-resources/">https://aws.amazon.com/blogs/containers/how-amazon-ecs-manages-cpu-and-memory-resources/</a></p><p><strong>Task and Bussiness Logic</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*ukiTvZWpm99ZQtA2xPkDpg.png" /></figure><h4>How does Scaling happens?</h4><p>ECS services simplify the deployment and management of containerized applications by automating task scheduling, ensuring a specified number of tasks are running, providing stable endpoints, and supporting features like scaling and rolling updates. They are a central component for maintaining the availability and reliability of containerized workloads in an ECS cluster. There are 2 types of scaling policy:</p><ol><li>Target Tracking Scaling Policy: Dynamically adjusts the desired task co unt based on a specified target metric, such as CPU utilization or request count.</li><li>Step Scaling Policy: Adjusts the desired task count in configurable steps in response to CloudWatch Alarms, allowing for more granular control over scaling actions.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*xoQZ443c3FCfbuNRy8HE8w.png" /></figure><h4>EC2 vs Fargate cost:</h4><p><a href="https://aws.amazon.com/blogs/containers/theoretical-cost-optimization-by-amazon-ecs-launch-type-fargate-vs-ec2/">Theoretical cost optimization by Amazon ECS launch type: Fargate vs EC2 | Amazon Web Services</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*FhlHt7e39qnnwx_Xy_i7zw.png" /></figure><p>After reviewing various blogs, it can be concluded that Fargate is the preferable pricing option when there is a desire to avoid managing the underlying infrastructure, dealing with variable workloads, or executing batch jobs. On the other hand, EC2 becomes a more suitable approach when there is a clear understanding of the computing needs and resource requirements for the microservices, and efficient utilization of those resources can be ensured.</p><p>Let’s explore AWS pricing calculator and get a rough idea about the cost:</p><p><em>(NOTE: Fargate costs /task basis and for EC2 we only have to pay for the underline EC2 instances, ECS, container orchestration is free)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nqnq2N5DJBArOF6fuLgzLA.png" /></figure><p>Note:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*kVx9XIpS2B7UCvaKZE4CDw.png" /></figure><p>For simplicity lets take 2 tasks for Fargate and 2 Ec2 instances for ECS on EC2 of 4vCPU and 16GB RAM each.</p><p>EC2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*EoHKT6jtvmy-_l1IEfR7mg.png" /></figure><p>Fargate</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*8_E3jHsGbf-jPMcWkk_Dww.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*ENAgSM50uKEvwtlJLgs2PQ.png" /></figure><h3>ECS WITH ELASTIC BEANSTALK</h3><p>Elastic Beanstalk, when integrated with ECS, provides a higher-level abstraction for deploying and managing containerized applications. ECS handles the details of container placement, health monitoring, and scaling based on the configurations you specify in ECS task definitions and Elastic Beanstalk environment settings. It combines the simplicity of Elastic Beanstalk with the container orchestration capabilities of ECS, offering a streamlined approach for deploying and managing containerized workloads.</p><p>While Elastic Beanstalk on ECS provides a simplified approach to deploying and managing containers, it may introduce limitations in terms of customization, operational control, and dependency on updates, particularly for users with advanced requirements or larger deployments. Users should carefully consider their specific use cases and preferences when choosing between Elastic Beanstalk and ECS on EC2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*GXdiJB3GduDrkYW4-o35sQ.png" /></figure><h3>Elastic Kubernetes Service</h3><p>reference: <a href="https://www.qovery.com/blog/deploying-containers-on-aws-elastic-beanstalk-vs-ecs-vs-eks/">https://www.qovery.com/blog/deploying-containers-on-aws-elastic-beanstalk-vs-ecs-vs-eks/</a></p><p>EKS provides a managed Kubernetes solution with scalability and AWS integration but may come with higher costs and a learning curve for those new to Kubernetes and AWS-specific configurations. Unlike ECS, EKS master plane is not free and we have to pay additional <strong><em>$73</em></strong> just for the EKS cluster and additional charges apply in the same way as in ECS, EKS also has 2 launch types with Fargate and EC2.</p><p>EKS is best suited for complex projects, where many team members will work on several deployments simultaneously or have a plan to move to multi-cloud or hybrid cloud options in the future, which is not possible in case of ECS since ECS is AWS specific also due to K8s open source nature we can integrate several open source tools build for K8s respectively.</p><h4><strong>What about just EC2?</strong></h4><p>No, then you would be on the path of reinventing the entire wheel, installing a Docker agent on each EC2 instance, managing their restarts, scaling, networking. If you attempt to set up a control plane for Kubernetes using kubeadm or kops, you will be responsible for all control plane nodes, such as KubeApiserver, etcd, etc. This can lead to too much headache. It’s better to use a container orchestration tool like EKS for complex projects and ECS for simpler ones.</p><h4><strong>Key Points to keep in mind while going with ECS</strong></h4><ul><li>Task Size and Container Size (Resource management)</li><li>Cost in case of Fargate and EC2 respectively</li><li>Additional hidden costs (ALB, CloudWatch,AppMesh(conditional))</li></ul><p>Note: no need to setup VPC,Subnet,EBS in case of Fargate but with EC2 we have to configure them.</p><p><strong><em>On a broader scale, we need to decide between Fargate and EC2. As other costs apply to both, it doesn’t matter if it’s EC2 or Fargate; ALB and CloudWatch will cost the same.</em></strong></p><blockquote>Potential Architecture: (App mesh of AWS is a service discovery)</blockquote><p>credits: <a href="https://www.udemy.com/course/aws-fargate-ecs-masterclass-microservices-docker-cloudformation/learn/lecture/17752928?start=285">https://www.udemy.com/course/aws-fargate-ecs-masterclass-microservices-docker-cloudformation/learn/lecture/17752928?start=285</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*dBf-QjTgfmTO_5cQxCXIgw.png" /></figure><p>Canary Deployment</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*68HJOqUkcx2BAjuaKsROng.png" /></figure><p>ECS easily integrates with CloudWatch and we can easily monitor our cluster/task/services/container logs etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*ZasM0D0yHdx2cytbhZliQw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*BAbqtdjQInr7Q4hsvx4-Gg.png" /></figure><p>ALB</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*Dc4ElaUFPVzGnnQa3Lyocw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d66b66c1f5d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TrueText: Your Guardian Against SMS Scams and Your Source for Latest News]]></title>
            <link>https://medium.com/@madmecodes/truetext-your-guardian-against-sms-scams-and-your-source-for-latest-news-52abbee194e6?source=rss-a9efe2ae36cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/52abbee194e6</guid>
            <category><![CDATA[bits-pilani]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[postman]]></category>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Tue, 24 Oct 2023 16:25:26 GMT</pubDate>
            <atom:updated>2023-10-24T16:25:26.397Z</atom:updated>
            <content:encoded><![CDATA[<p>BITS Pilani Postman API Hackathon 3.0</p><h3><strong>What does our app do?</strong></h3><p>In a world where SMS messages can hide potential scams and spam, From <strong>fake electricity bill alerts</strong> to suspicious<strong> lottery winnings</strong> and phishing scams, the world of SMS is fraught with potential pitfalls. Unsuspecting users often fall victim to scams and spam that threaten their privacy, security, and peace of mind. <strong>TrueText is your vigilant guardian</strong>. Our app doesn’t send or receive messages but loads your SMS inbox, identifying scams, fraud, and spam on the basis of our <strong><em>Machine Learning model</em></strong><em> </em>at backend to provide <strong>immediate alerts </strong>and educational resources, ensuring a safer SMS experience. TrueText prioritizes your privacy, <strong>respecting your data security</strong> while offering the <strong>latest news</strong> through a dedicated section, keeping you informed on global events and personalized interests. Join TrueText to protect yourself and stay well-informed, all within a single app.</p><p><strong>Glimpses of our app</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZuIGAR0ViG1JkMVx_7Ckug.png" /></figure><h3>1. Our “Spam detector” AI model</h3><p>When you grant us permission to access your messages, we respect your privacy and ensure the security of your data. Our SMS screen is powered by a sophisticated AI model developed using Flask in the backend and the <strong>Python NLTK library</strong>. This AI model works in the background, analyzing every incoming message. It employs its extensive training to <strong>detect potential spammers and fraudsters</strong>. When a suspicious message is identified, <strong>TrueText highlights that SMS</strong>, ensuring that you are aware of any potential threats. To dive deeper into the message and its content, you can click on the <strong>SMS to access a detailed screen</strong>. This feature allows you to examine the message closely, making informed decisions about its authenticity and potential risks. TrueText’s SMS screen combines advanced technology with a user-friendly interface to keep your SMS experience secure and spam-free.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*btU45GjRexl4a-lCuFWThw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*2Fc8H3r1gItJADuGve-e3Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*OPnT78DqT7a6CircOByPGg.png" /></figure><h3>2. News Screen</h3><p>TrueText’s news screen is a comprehensive source of information that keeps users well-informed about the world. Divided into three sections, it covers the trending topics, the latest news, and even exposes scams. The “Trending” section allows users to stay updated with the most talked-about and relevant stories. The “Latest” section provides a real-time feed of breaking news, ensuring you’re always in the know. Most importantly, the “Scams” section acts as a vigilant guardian, alerting users to potential fraud and deceptive practices. TrueText’s news screen not only educates and entertains but also safeguards users against misinformation and scams, creating a well-rounded and secure user experience.</p><h3>3. Message Check Screen</h3><p>The Message Check Screen in TrueText is a user-friendly tool that empowers you to verify the authenticity and accuracy of any message with ease. Whether it’s an important piece of information, a suspicious message, or simply a doubt in your mind, this feature allows you to paste any type of message. With a simple click of a button, you can initiate the validation process, ensuring that the provided message is correct and trustworthy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*I6ewa7muKaIMiqw-V0P-qg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*CdU2F0Br3byariHLAbtdeQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*rPXLJp07nmLprOobXUHrdA.jpeg" /></figure><h3>#Developers’ Experience</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LIbsudMoPfg5zLmSqIWqYw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*TfBOExPuFldORkQkrj0_tA.png" /></figure><p>GitHub Repo : <a href="https://github.com/Pushkarm029/TrueText">https://github.com/Pushkarm029/TrueText</a></p><p>Full history of this app can be found in the commits of GitHub, it was a journey of 31 commits { 16/10/2023 to 23/10/2023}. Talking about myself i’m Ayush Gupta, fresher at BITS-Pilani,Pilani campus and i love to build stuff, . I love to build things, and I reached out to one of my seniors on LinkedIn. This is how it all started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*D6ycFHnj961_P2-PeBC_cA.png" /></figure><p>After six days of brainstorming, starting from the idea of a News extension to transitioning into the world of Web3, we struggled to reach a decision. Then, we faced a week-long mid-semester exam from 9/10 to 16/10, so we were studying, i meant trying to study. Once the mid-sem got over we sat together and finally concluded on the idea what we are gonna make “TrueText”.<strong> Our tech stack was Flask for backend and AI training , React-Native, Tailwind CSS for frontend, Aws for deployment, and developer tools like Git for version control and Postman for API testing. </strong>Core Backend and AI training was managed by <a href="https://twitter.com/pushkarm029">Pushkar Mishra</a> and, frontend and deployment by <a href="https://twitter.com/madmecodes">Ayush Gupta</a> (its me!). It was an easy journey untill integration part came, i really learned a lot in how to integrate backend with frontend, Googling the errors — it’s a skill. GPT sucks. Finally, after establishing our connection, we were all ready with our lovely app, <strong>TrueText!</strong></p><blockquote>GitHub Repo : <a href="https://github.com/Pushkarm029/TrueText">https://github.com/Pushkarm029/TrueText</a></blockquote><blockquote>App Explanation: <a href="https://www.youtube.com/watch?v=L6OYTkpkcac">https://www.youtube.com/watch?v=L6OYTkpkcac</a></blockquote><blockquote>App Mockup : <a href="https://www.youtube.com/watch?v=7Ae_UwcafhM">https://www.youtube.com/watch?v=7Ae_UwcafhM</a></blockquote><blockquote>API Collection: <a href="https://www.postman.com/flight-astronomer-50231948/workspace/truetextworkspace/collection/29423079-e74a410c-6cee-4efb-8371-39f843c0bb90?action=share&amp;creator=29423079">Postman workspace link click me</a></blockquote><p>Ayush Gupta : <a href="https://bio.link/ayushbio">https://bio.link/ayushbio</a></p><p>Pushkar Mishra : <a href="https://pushkarm029.bio.link/">https://pushkarm029.bio.link/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52abbee194e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>