<?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: Luis Núñez</title>
    <description>The latest articles on DEV Community by Luis Núñez (@luisenr).</description>
    <link>https://dev.to/luisenr</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4046241%2F62ea3e98-d95a-42be-b649-4b8dce3fe977.png</url>
      <title>DEV Community: Luis Núñez</title>
      <link>https://dev.to/luisenr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/luisenr"/>
    <language>en</language>
    <item>
      <title>AWS Messaging: SQS vs SNS vs EventBridge</title>
      <dc:creator>Luis Núñez</dc:creator>
      <pubDate>Sun, 27 Sep 2026 00:25:40 +0000</pubDate>
      <link>https://dev.to/luisenr/aws-messaging-sqs-vs-sns-vs-eventbridge-48i8</link>
      <guid>https://dev.to/luisenr/aws-messaging-sqs-vs-sns-vs-eventbridge-48i8</guid>
      <description>&lt;p&gt;Hello everyone! Recently, I have been learning a lot about backend architecture and microservices.&lt;/p&gt;

&lt;p&gt;When we move from a monolithic application (where if one part fails, the whole system crashes) to microservices, we have a big challenge: How do we make our services communicate without being tightly connected?&lt;/p&gt;

&lt;p&gt;AWS gives us three great services for this: &lt;strong&gt;Amazon SQS&lt;/strong&gt;, &lt;strong&gt;Amazon SNS&lt;/strong&gt;, and &lt;strong&gt;Amazon EventBridge&lt;/strong&gt;. At first, they looked very similar to me, but they have very different jobs. Here are my study notes on how to understand them!&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Amazon SQS: The Buffer (1-to-1 Queue)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Amazon SQS (Simple Queue Service)&lt;/strong&gt; is a message queue. It saves messages safely until a consumer is ready to process them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How it works:&lt;/strong&gt; It uses a &lt;em&gt;Pull&lt;/em&gt; model. Your app sends a message to the queue, and a worker asks for the message, processes it, and deletes it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Easy Analogy:&lt;/strong&gt; Imagine a tech support waiting line. If 100 people need help at the same time, the IT guy doesn't have to talk to everyone at once. They take a ticket, wait in the queue, and the IT guy helps them one by one at his own speed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why it's great:&lt;/strong&gt; It prevents your system from crashing when you have too much traffic.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Amazon SNS: Mass Notifications (1-to-Many Pub/Sub)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Amazon SNS (Simple Notification Service)&lt;/strong&gt; is a Publish/Subscribe service.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How it works:&lt;/strong&gt; It uses a &lt;em&gt;Push&lt;/em&gt; model. A publisher sends one message to a "Topic", and SNS immediately delivers that message to all subscribers (like emails, SMS, or other queues).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Easy Analogy:&lt;/strong&gt; Think of it like a megaphone. You shout the news only once, and everybody in the room hears it at the exact same time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why it's great:&lt;/strong&gt; It is perfect for the &lt;em&gt;Fan-out&lt;/em&gt; pattern (sending the same event to many different places in parallel).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Amazon EventBridge: The Smart Router
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Amazon EventBridge&lt;/strong&gt; is a serverless event bus. It is perfect for Event-Driven Architectures.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How it works:&lt;/strong&gt; It receives events from your apps, AWS services, or external platforms (like Stripe), looks at the data, and uses rules to decide where to send them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Easy Analogy:&lt;/strong&gt; It is like a post office. The worker looks at the address on your package, reads the rules, and decides which truck should take it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why it's great:&lt;/strong&gt; It has advanced filtering. It can read the JSON content of the event and make smart routing decisions.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  A Real-World Story: Combining all three
&lt;/h2&gt;

&lt;p&gt;Let's imagine it is a busy Friday night. You are very hungry and you order a pizza using a food delivery app. How do these three services work together behind the scenes?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Order:&lt;/strong&gt; You click "Buy". The mobile app sends an &lt;code&gt;OrderPlaced&lt;/code&gt; event to &lt;strong&gt;Amazon EventBridge&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Smart Routing:&lt;/strong&gt; &lt;strong&gt;EventBridge&lt;/strong&gt; looks at the event. Because the payment was successful, its rules decide to send the event to two places: the restaurant and the notification system. It sends the event to an &lt;strong&gt;Amazon SNS&lt;/strong&gt; topic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Megaphone:&lt;/strong&gt; The &lt;strong&gt;SNS&lt;/strong&gt; topic receives the event and shouts: &lt;em&gt;"New order!"&lt;/em&gt;. It immediately sends a Push notification to your phone ("Your pizza is confirmed!") and also sends the data to the restaurant's system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Safe Queue:&lt;/strong&gt; But wait! It's Friday night and the restaurant is receiving 500 orders per minute! To protect the kitchen's database from exploding, SNS sends the orders to an &lt;strong&gt;Amazon SQS&lt;/strong&gt; queue. The kitchen software pulls the orders from the SQS queue one by one, calmly, without crashing.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this story, every microservice works independently. If the notification service breaks down, the kitchen is still receiving orders from the SQS queue!&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 Bonus Tip: The "Backpressure" Trap
&lt;/h2&gt;

&lt;p&gt;When I started exploring AWS, I thought: &lt;em&gt;"I will just connect SNS directly to my database or my Lambda function to get messages fast!"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;But this is a dangerous mistake, this causes a problem called &lt;strong&gt;Backpressure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because SNS pushes messages immediately, if your system receives a huge peak of 10,000 events in one second, SNS will try to push all 10,000 events to your server at the same time. Your server will probably crash!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The solution architects use:&lt;/strong&gt; The "SNS + SQS Fan-Out" pattern.&lt;br&gt;
Never connect SNS directly to your final worker. Instead, put an &lt;strong&gt;SQS queue&lt;/strong&gt; in front of every consumer. SNS will push the message to the queue, and your worker will pull from the queue safely. The queue acts as a shock absorber!&lt;/p&gt;




&lt;p&gt;What messaging pattern do you use the most in your backend projects? Let me know in the comments! 👇&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>aws</category>
      <category>backend</category>
      <category>microservices</category>
    </item>
    <item>
      <title>A Practical Guide to Azure PostgreSQL: Migration, Replicas, and Tuning ☁️🐘</title>
      <dc:creator>Luis Núñez</dc:creator>
      <pubDate>Sat, 25 Jul 2026 02:12:00 +0000</pubDate>
      <link>https://dev.to/luisenr/hands-on-azure-configuring-migrating-and-optimizing-postgresql-flexible-server-3fpl</link>
      <guid>https://dev.to/luisenr/hands-on-azure-configuring-migrating-and-optimizing-postgresql-flexible-server-3fpl</guid>
      <description>&lt;p&gt;In this post, I summarize my hands-on experience completing the &lt;strong&gt;Microsoft Applied Skills: Configure and migrate to Azure Database for PostgreSQL&lt;/strong&gt; assessment. &lt;/p&gt;

&lt;p&gt;Using &lt;strong&gt;Azure Portal&lt;/strong&gt;, &lt;strong&gt;pgAdmin&lt;/strong&gt;, and &lt;strong&gt;PostgreSQL&lt;/strong&gt;, I walked through the core architectural tasks of setting up, securing, migrating, replicating, and optimizing a managed relational database in the cloud.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ Step-by-Step Lab Execution
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Security &amp;amp; Monitoring Setup
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Authentication:&lt;/strong&gt; Configured dual authentication on Azure Database for PostgreSQL Flexible Server (&lt;code&gt;psql63693133&lt;/code&gt;), enabling Microsoft Entra ID alongside native PostgreSQL authentication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network Isolation:&lt;/strong&gt; Isolated server traffic within &lt;code&gt;VNET1/subnet1&lt;/code&gt; by creating a &lt;strong&gt;Private Endpoint&lt;/strong&gt; (&lt;code&gt;psql63693133-pe&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Diagnostics:&lt;/strong&gt; Configured &lt;strong&gt;Diagnostic Settings&lt;/strong&gt; (&lt;code&gt;logs-to-loganalytics&lt;/code&gt;) to route &lt;code&gt;PostgreSQL Sessions data&lt;/code&gt; logs to an Azure &lt;strong&gt;Log Analytics Workspace&lt;/strong&gt; (&lt;code&gt;loganalytics1&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. Migration &amp;amp; Handling the B-Tree Index Error
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data Restore:&lt;/strong&gt; Restored the &lt;code&gt;adventureworks&lt;/code&gt; sample database to Azure using pgAdmin's restore tool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-World Error:&lt;/strong&gt; During &lt;code&gt;pg_restore&lt;/code&gt;, a known error occurred due to the PostgreSQL B-tree index row size limit:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ERROR: index row size 2896 exceeds btree version 4 maximum 2704 for index "IX_ProductReview_ProductID_Name"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Resolution &amp;amp; Impact:&lt;/strong&gt; This error was non-fatal. Because PostgreSQL restores table rows before creating secondary indexes, all schema structures and data were successfully imported. Only the secondary index on &lt;code&gt;productreview.comments&lt;/code&gt; failed due to text size limits.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  3. Cross-Region Read Replication
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;High Availability:&lt;/strong&gt; Created a Read Replica (&lt;code&gt;psql63693133-replica&lt;/code&gt;) to offload read-heavy workloads and increase resiliency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Paired Region:&lt;/strong&gt; Deployed the replica in &lt;strong&gt;Canada Central&lt;/strong&gt; (the paired region for the primary server located in &lt;strong&gt;Canada East&lt;/strong&gt;).&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  4. Query Performance Optimization
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;EXPLAIN Plan:&lt;/strong&gt; Analyzed the &lt;code&gt;public.address1()&lt;/code&gt; function in pgAdmin, extracted its underlying SQL query, generated the &lt;strong&gt;EXPLAIN&lt;/strong&gt; execution plan, and exported the visual output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Index Creation:&lt;/strong&gt; Identified a sequential scan bottleneck on &lt;code&gt;person.address&lt;/code&gt; and resolved it by creating a targeted index:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;INDEX&lt;/span&gt; &lt;span class="n"&gt;IX_Address_StateProvinceID&lt;/span&gt; 
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;address&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;stateprovinceid&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  💡 Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Private Endpoints First:&lt;/strong&gt; Always restrict database traffic to private virtual networks before migrating production data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Understand Migration Logs:&lt;/strong&gt; Non-critical index failures (like B-tree row limits on text columns) do not invalidate full data restores.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analyze Before Scaling:&lt;/strong&gt; Using &lt;code&gt;EXPLAIN&lt;/code&gt; to spot missing indexes solves query bottlenecks without needing to increase expensive server compute tiers.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 Try It Yourself
&lt;/h2&gt;

&lt;p&gt;Put your hands-on cloud skills to the test with the official assessment module on Microsoft Learn:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://learn.microsoft.com/credentials/applied-skills/configure-and-migrate-to-azure-database-for-postgresql/?wt.mc_id=studentamb_578610" rel="noopener noreferrer"&gt;Microsoft Applied Skills: Configure and migrate to Azure Database for PostgreSQL&lt;/a&gt;&lt;/p&gt;

</description>
      <category>azure</category>
      <category>postgres</category>
      <category>database</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
