<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: João Vitor Nascimento Mendonca</title>
    <description>The latest articles on DEV Community by João Vitor Nascimento Mendonca (@joaovitorfortuna).</description>
    <link>https://dev.to/joaovitorfortuna</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3873770%2F402a4344-569d-4eb5-ada4-aa2f1515e7ef.png</url>
      <title>DEV Community: João Vitor Nascimento Mendonca</title>
      <link>https://dev.to/joaovitorfortuna</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/joaovitorfortuna"/>
    <language>en</language>
    <item>
      <title>Title: Beyond Auto-scaling: Engineering Cost-Efficiency into Cloud-Native Architectures</title>
      <dc:creator>João Vitor Nascimento Mendonca</dc:creator>
      <pubDate>Sat, 11 Apr 2026 16:46:53 +0000</pubDate>
      <link>https://dev.to/joaovitorfortuna/title-beyond-auto-scaling-engineering-cost-efficiency-into-cloud-native-architectures-3kmi</link>
      <guid>https://dev.to/joaovitorfortuna/title-beyond-auto-scaling-engineering-cost-efficiency-into-cloud-native-architectures-3kmi</guid>
      <description>&lt;p&gt;published: João Vitor Nascimento de mendonça&lt;br&gt;
description: How to move from "scaling at all costs" to "resource stewardship" using VPA, Graviton, and Spot Instances.&lt;br&gt;
tags: aws, kubernetes, finops, architecture&lt;br&gt;
cover_image: &lt;a href="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/example-cloud-cost.png" rel="noopener noreferrer"&gt;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/example-cloud-cost.png&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  series: Modern Infrastructure Series
&lt;/h2&gt;

&lt;p&gt;Part 2: The Post BodyPaste this into the main content area.1. The Fallacy of "Infinite" CloudIn the early days of Cloud adoption, the mantra was "scale at all costs." In 2026, the industry has shifted. The new gold standard is Resource Stewardship.I recently audited a microservices environment where the cloud bill was growing faster than the user base. The culprit wasn't traffic—it was over-provisioning and a lack of cost-awareness in the development cycle. Here is how we re-engineered the platform for efficiency.2. Data-Driven Right-SizingWe stopped relying on "gut feelings" for Kubernetes resource requests. Instead of guessing how much memory a service needed, we implemented Vertical Pod Autoscaler (VPA) in recommendation mode.The Insight: We discovered that 60% of our services were using less than 20% of their allocated CPU.The Action: We automated the adjustment of requests and limits to match real-world $P95$ usage.The Result: A 35% reduction in wasted cluster capacity overnight.3. Embracing Spot Instances and ARM64We re-architected non-critical workloads to run on Amazon EC2 Spot Instances paired with AWS Graviton (ARM64) processors.Handling InterruptionsTo use Spot instances safely, we implemented graceful shutdown handlers to catch the 2-minute interruption notice:Go// Simplified logic for Spot Interruption handling&lt;br&gt;
func handleTermination() {&lt;br&gt;
    termChan := make(chan os.Signal, 1)&lt;br&gt;
    signal.Notify(termChan, syscall.SIGTERM)&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;-termChan // Interruption signal received
log.Println("Spot instance terminating. Shifting state to Redis...")

// Logic to drain connections and save state
cache.SaveWorkerState(currentJobs)
os.Exit(0)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
Outcome: This shift resulted in a 60% cost reduction for our CI/CD pipelines and data processing workers.4. "FinOps as Code"Engineering excellence is no longer just about uptime; it's about financial visibility. We integrated cost-estimation tools (like Infracost) directly into our Terraform pipelines.Every Pull Request now displays an estimated monthly cost change. If a developer tries to provision a massively oversized RDS instance, the system flags it during the code review phase, not when the bill arrives.5. ConclusionA great architect builds systems that are as lean as they are powerful. By treating cost as a first-class metric—right alongside latency and availability—we build more sustainable technology.How is your team handling cloud costs this year? Let’s discuss below!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>kubernetes</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Beyond Logs: Implementing Tracing and Golden Signals for Distributed Systems</title>
      <dc:creator>João Vitor Nascimento Mendonca</dc:creator>
      <pubDate>Sat, 11 Apr 2026 16:41:36 +0000</pubDate>
      <link>https://dev.to/joaovitorfortuna/beyond-logs-implementing-tracing-and-golden-signals-for-distributed-systems-2kke</link>
      <guid>https://dev.to/joaovitorfortuna/beyond-logs-implementing-tracing-and-golden-signals-for-distributed-systems-2kke</guid>
      <description>&lt;p&gt;By: João Vitor Nascimento De Mendonça&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The Observability Gap&lt;br&gt;
In a microservices environment, having logs is not enough. When a request fails, you need to know exactly where the bottleneck is. I recently moved a legacy monitoring setup to an OpenTelemetry-based tracing system to solve "hidden" latencies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Four Golden Signals&lt;br&gt;
We focused on the Google SRE Golden Signals:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Latency: Time it takes to service a request.&lt;/p&gt;

&lt;p&gt;Traffic: Demand placed on the system.&lt;/p&gt;

&lt;p&gt;Errors: The rate of requests that fail.&lt;/p&gt;

&lt;p&gt;Saturation: How "full" your service is.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Implementation: Distributed Tracing&lt;br&gt;
By injecting Trace IDs across services, we could visualize the entire request lifecycle. We discovered that a specific middleware was adding 120ms of unnecessary overhead to every auth request—a find that logs alone couldn't pinpoint.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Conclusion&lt;br&gt;
Logs tell you what happened; traces tell you where and why. If you aren't using distributed tracing in 2026, you are flying blind.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Post 3: Escalabilidade de Dados&lt;br&gt;
Title: Database Sharding vs. Read Replicas: How We Scaled for 1M Concurrent Users&lt;br&gt;
By: João Vitor Nascimento De Mendonça&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The Vertical Scaling Wall&lt;br&gt;
There comes a point where "just get a bigger instance" stops working for your database. We hit that wall when our RDS instance reached 90% CPU utilization even on the largest tier.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strategy 1: CQRS and Read Replicas&lt;br&gt;
The first step was separating concerns using the CQRS (Command Query Responsibility Segregation) pattern.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All writes go to the Primary instance.&lt;/p&gt;

&lt;p&gt;All heavy GET requests are load-balanced across Read Replicas.&lt;/p&gt;

&lt;p&gt;Result: CPU usage dropped by 40% instantly.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Strategy 2: Application-Level Sharding&lt;br&gt;
For the most critical tables, we implemented Sharding based on user_id. By distributing data across multiple physical shards, we ensured that no single database became a single point of failure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Conclusion&lt;br&gt;
Scaling databases is 10% hardware and 90% architecture. Sharding is complex, but for massive scale, it’s the only path forward.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>sre</category>
      <category>monitoring</category>
      <category>distributedtracing</category>
      <category>observability</category>
    </item>
    <item>
      <title>Beyond the Perimeter: Implementing Zero Trust and Ephemeral Identities in Multi-Cloud Environments</title>
      <dc:creator>João Vitor Nascimento Mendonca</dc:creator>
      <pubDate>Sat, 11 Apr 2026 16:18:50 +0000</pubDate>
      <link>https://dev.to/joaovitorfortuna/alem-do-perimetro-implementando-zero-trust-e-identidades-efemeras-em-ambientes-multi-cloud-49lc</link>
      <guid>https://dev.to/joaovitorfortuna/alem-do-perimetro-implementando-zero-trust-e-identidades-efemeras-em-ambientes-multi-cloud-49lc</guid>
      <description>&lt;p&gt;By: João Vitor Nascimento De Mendonça&lt;/p&gt;

&lt;p&gt;Field: Cybersecurity / Cloud Engineering&lt;/p&gt;

&lt;p&gt;Publication: Cloud Architecture Hub / Independent Technical Series&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Death of the "Castle and Moat" Model
Until recently, network security relied on the idea of a strong perimeter: once you were inside the VPN, you were trusted. In 2026, with the fragmentation of microservices and multi-cloud architectures (AWS, GCP, Azure), this model has failed. The perimeter is no longer the network; the perimeter is now Identity.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Implementing a Zero Trust Architecture (ZTA) starts with a simple but rigorous principle: "Never trust, always verify." It doesn't matter if the request comes from inside or outside the network; every access must be authenticated and authorized.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Technical Implementation: Ephemeral Identities
The greatest security risk today is static credentials (API keys that never expire). To mitigate this, I moved our infrastructure to an Ephemeral Identity model.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Short-Lived Tokens: Instead of static keys, we use tools like HashiCorp Vault or AWS IAM Roles Anywhere to generate credentials with a Time-to-Live (TTL) of only 15 minutes.&lt;/p&gt;

&lt;p&gt;mTLS (Mutual TLS): We implemented mTLS via a Service Mesh (Istio). This ensures that every microservice has its own digital certificate and that communication is encrypted and verified at both ends.&lt;/p&gt;

&lt;p&gt;Policy Enforcement (Open Policy Agent - OPA)&lt;br&gt;
To ensure no S3 bucket is created without encryption, we use "Security as Code" to block non-compliant infrastructure:&lt;/p&gt;

&lt;p&gt;Code snippet&lt;/p&gt;

&lt;h1&gt;
  
  
  OPA Rule to prevent public buckets
&lt;/h1&gt;

&lt;p&gt;package cloud.security&lt;/p&gt;

&lt;p&gt;deny[msg] {&lt;br&gt;
    input.resource == "aws_s3_bucket"&lt;br&gt;
    input.attributes.acl == "public-read"&lt;br&gt;
    msg := "ERROR: Public buckets are not allowed by compliance policy."&lt;br&gt;
}&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Benefits and Success Metrics
The transition to Zero Trust isn't just about security; it’s about operational efficiency. By automating identity management, we observed:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;98% Reduction in the exposure window in the event of credential leakage (due to short TTL).&lt;/p&gt;

&lt;p&gt;Automatic Compliance: Significantly less time spent on manual audits, as policies are enforced directly within the CI/CD pipeline.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Conclusion
Modern security cannot be a "bottleneck" for development. By transforming security into code and adopting ephemeral identities, we allow engineering teams to move fast, with the certainty that every byte exchanged across clouds is protected and verified.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>security</category>
      <category>cloud</category>
      <category>devops</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>Mitigating I/O Bottlenecks in Event-Driven Architectures: A Deep Dive into Backpressure and Resiliency</title>
      <dc:creator>João Vitor Nascimento Mendonca</dc:creator>
      <pubDate>Sat, 11 Apr 2026 16:10:35 +0000</pubDate>
      <link>https://dev.to/joaovitorfortuna/mitigando-gargalos-de-io-em-arquiteturas-orientadas-a-eventos-backpressure-retries-e-tuning-de-33ac</link>
      <guid>https://dev.to/joaovitorfortuna/mitigando-gargalos-de-io-em-arquiteturas-orientadas-a-eventos-backpressure-retries-e-tuning-de-33ac</guid>
      <description>&lt;p&gt;By: João Vitor Nascimento De Mendonça                                 Originally published in Engineering Weekly / Tech Blog&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Scenario: The Chaos of Unmanaged Scale
In modern architectures, using Apache Kafka or RabbitMQ solves decoupling issues but creates a new challenge: throughput disparity.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I recently observed a scenario where a producer was injecting 50k msgs/s, while the consumer—limited by a third-party API—could only process 10k msgs/s. The result? Metric omission, heap memory exhaustion, and cascading latency across the entire system.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Backpressure and Concurrency Control
To solve this, simply "scaling the pod" isn't enough. I implemented Semaphore-based Concurrency Control. In Go, for instance, we use buffered channels as semaphores to limit active workers:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Go&lt;br&gt;
// Example of a concurrency limiter for DB protection&lt;br&gt;
var semaphore = make(chan struct{}, 50) // Limit to 50 active workers&lt;/p&gt;

&lt;p&gt;func processEvent(event Event) {&lt;br&gt;
    semaphore &amp;lt;- struct{}{} // Acquire slot&lt;br&gt;
    defer func() { &amp;lt;-semaphore }() // Release slot&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Processing logic and DB persistence
db.Save(event)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
Additionally, we integrated a Circuit Breaker (using Resilience4j/Hystrix). If the database begins responding above a 500ms threshold, the circuit opens, immediately halting queue consumption. This prevents the application from crashing while attempting to process requests it cannot currently deliver.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Infrastructure Tuning: Optimizing the Garbage Collector (GC)
Latency wasn't solely caused by I/O; millisecond pauses from the Garbage Collector were locking up processing via "Stop-the-World" events.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We migrated from traditional x86 instances to AWS Graviton (ARM64) and fine-tuned the ZGC (on Java 21+). Our goal was to maintain pauses below 1ms, even with large heaps.&lt;/p&gt;

&lt;p&gt;The Result: An 85% reduction in GC pauses, stabilizing throughput during high-traffic peaks.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Resilience with Dead Letter Queues (DLQ)
Errors are inevitable. Our strategy involved implementing Exponential Backoff. If a message fails, it doesn't block the main queue; instead, it is routed to a Retry Topic with increasing delays (1s, 10s, 1min). Once retries are exhausted, the message lands in a DLQ (Dead Letter Queue) for manual inspection.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Field Note: Never allow infinite retries without backoff. Doing so is essentially a self-inflicted Denial of Service (DoS) attack against your own database.&lt;/p&gt;

</description>
      <category>go</category>
      <category>performance</category>
      <category>backend</category>
      <category>architecture</category>
    </item>
  </channel>
</rss>
