<?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: Odinaka Robert Nnamani</title>
    <description>The latest articles on DEV Community by Odinaka Robert Nnamani (@robertpaschal).</description>
    <link>https://dev.to/robertpaschal</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%2F2167197%2Fecea0dc6-e64a-4d17-86da-0ec53a674663.jpeg</url>
      <title>DEV Community: Odinaka Robert Nnamani</title>
      <link>https://dev.to/robertpaschal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/robertpaschal"/>
    <language>en</language>
    <item>
      <title>The still voice</title>
      <dc:creator>Odinaka Robert Nnamani</dc:creator>
      <pubDate>Wed, 18 Nov 2026 13:04:04 +0000</pubDate>
      <link>https://dev.to/robertpaschal/the-still-voice-1lfl</link>
      <guid>https://dev.to/robertpaschal/the-still-voice-1lfl</guid>
      <description>&lt;p&gt;The still voice&lt;/p&gt;

&lt;p&gt;The waiting is not empty time. It is the preparation.&lt;/p&gt;

&lt;p&gt;Times are about to change, and in a very significant way. Honestly, I cannot wait to get through to that other end of my story. Even though there is clearly a reason to stay, it seems as if I am just wasting my time away, doing nothing. Probably that is not entirely true, and there is clearly more to come down the line for me.&lt;/p&gt;

&lt;p&gt;I just need to breathe and prepare myself mentally. I do not see there being much of a break in this coming phase, and maybe that is why now is a reconnaissance period. I am in a lobby, waiting for the new session to load, and during that time, I have a lot to prepare for.&lt;/p&gt;

&lt;p&gt;What is that? I am starting my MSc program, and that should be the entrance to a more stable life. I seem so obsessed with moving up the pace, and maybe that strength is what keeps me going somehow. I must keep going. Definitely, it has not been so easy, nor has there been that clear stack. I do not know if I will actually succeed, or what it means to me at this stage. All I know is that now is slow, and all my thinking has not made it any clearer what my energy should be focused on right now.&lt;/p&gt;

&lt;p&gt;I am just holding on, trying to pass the time as if it was not there. I try, and I am praying, really. I listen to see if there is a voice I am missing, or what is expected of me. I try not to think too much about how I feel stuck and how things seem to be moving slowly. I must keep on, though. Something is happening, and even though I cannot see it, I know it is coming. Rest or not, it is not in my place to be so fast with reality.&lt;/p&gt;

&lt;p&gt;I just have to learn to be present with myself, yet remain ever so engaged in getting it right for my future. Maybe that dance is not an easy one, and things will not go as easily, but it is daring to want to try, and if all else fails, I would know I did my best. Such is the life of any young person. It thaws and yawns, and still, there is quite a lot to uncover. It is not like it gets easier with older games or younger ones. It is just that things tend to be more settled at those extremes, and it is only during this transition period that it is quite glaring that something needs to be done.&lt;/p&gt;

&lt;p&gt;I am not trying to push my luck. I already know it is not going to be exactly easy, and I have accepted to do this with God and seek His guidance on what is best to make this work out. Through and through, it comes along just fine, and it will be that which eventually determines how far I would go. All these doubts and fears will then be quieted.&lt;/p&gt;

&lt;p&gt;What is the still voice in your waiting telling you to prepare for? Name the preparation, not the whole plan.&lt;br&gt;
Next in this series: Anticipation.&lt;/p&gt;

</description>
      <category>education</category>
      <category>learning</category>
      <category>mentalhealth</category>
    </item>
    <item>
      <title>The SQL your Drizzle schema doesn't know about</title>
      <dc:creator>Odinaka Robert Nnamani</dc:creator>
      <pubDate>Mon, 16 Nov 2026 18:36:36 +0000</pubDate>
      <link>https://dev.to/robertpaschal/the-sql-your-drizzle-schema-doesnt-know-about-ijl</link>
      <guid>https://dev.to/robertpaschal/the-sql-your-drizzle-schema-doesnt-know-about-ijl</guid>
      <description>&lt;p&gt;Open your &lt;code&gt;schema.ts&lt;/code&gt;. It looks like your whole database: every table, every column, every index, typed and diffed.&lt;/p&gt;

&lt;p&gt;Now go look at your migrations folder.&lt;/p&gt;

&lt;p&gt;Somewhere in there is a file like &lt;code&gt;0007_custom.sql&lt;/code&gt;. It has the &lt;code&gt;updated_at&lt;/code&gt; trigger. Maybe a &lt;code&gt;CREATE EXTENSION pgcrypto&lt;/code&gt;. Maybe the column comments your data team asked for six months ago. Someone wrote it by hand with &lt;code&gt;drizzle-kit generate --custom&lt;/code&gt;, and it's the only place any of that exists.&lt;/p&gt;

&lt;p&gt;Your schema doesn't know about it. Your teammates don't either, until something breaks. And when a table gets dropped and recreated, Postgres drops its triggers with it, quietly.&lt;/p&gt;

&lt;p&gt;If that sounds familiar, you're in big company. "Let Drizzle declare triggers" is one of the most-reacted open issues on the Drizzle repo, and the requests for comments, extensions and partitions aren't far behind:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you want&lt;/th&gt;
&lt;th&gt;Issue&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;CREATE FUNCTION&lt;/code&gt; / &lt;code&gt;CREATE TRIGGER&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/drizzle-team/drizzle-orm/issues/843" rel="noopener noreferrer"&gt;#843&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;COMMENT ON&lt;/code&gt; tables and columns&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/drizzle-team/drizzle-orm/issues/886" rel="noopener noreferrer"&gt;#886&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;CREATE EXTENSION&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/drizzle-team/drizzle-orm/issues/2124" rel="noopener noreferrer"&gt;#2124&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Partitioned tables&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/drizzle-team/drizzle-orm/issues/2854" rel="noopener noreferrer"&gt;#2854&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TimescaleDB hypertables&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/drizzle-team/drizzle-orm/issues/2962" rel="noopener noreferrer"&gt;#2962&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;On 10 Nov, the first four had over 1,000 reactions between them.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;&lt;a href="https://github.com/Robertpaschal/drizzle-pg-extras" rel="noopener noreferrer"&gt;drizzle-pg-extras&lt;/a&gt;&lt;/strong&gt;, and 0.5.0 is on npm today.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before and after
&lt;/h2&gt;

&lt;p&gt;Here's what the &lt;code&gt;updated_at&lt;/code&gt; case looks like today, by hand:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- 0007_custom.sql (hope someone remembers this exists)&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;OR&lt;/span&gt; &lt;span class="k"&gt;REPLACE&lt;/span&gt; &lt;span class="k"&gt;FUNCTION&lt;/span&gt; &lt;span class="nf"&gt;set_users_updated_at&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;RETURNS&lt;/span&gt; &lt;span class="k"&gt;trigger&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; $$
&lt;span class="k"&gt;BEGIN&lt;/span&gt;
  &lt;span class="no"&gt;NEW&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;updated_at&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;now&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;RETURN&lt;/span&gt; &lt;span class="no"&gt;NEW&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;END&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
$$ &lt;span class="no"&gt;LANGUAGE&lt;/span&gt; &lt;span class="n"&gt;plpgsql&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TRIGGER&lt;/span&gt; &lt;span class="n"&gt;users_set_updated_at&lt;/span&gt;
  &lt;span class="no"&gt;BEFORE&lt;/span&gt; &lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;
  &lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="no"&gt;EACH&lt;/span&gt; &lt;span class="k"&gt;ROW&lt;/span&gt; &lt;span class="no"&gt;EXECUTE&lt;/span&gt; &lt;span class="k"&gt;FUNCTION&lt;/span&gt; &lt;span class="nf"&gt;set_users_updated_at&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="no"&gt;COMMENT&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;IS&lt;/span&gt; &lt;span class="s1"&gt;'Application users'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="no"&gt;COMMENT&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;COLUMN&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="k"&gt;IS&lt;/span&gt; &lt;span class="s1"&gt;'Login email'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="no"&gt;EXTENSION&lt;/span&gt; &lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;EXISTS&lt;/span&gt; &lt;span class="n"&gt;pgcrypto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And here it is with drizzle-pg-extras, sitting right next to the table it belongs to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;pgcrypto&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;pgExtension&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"pgcrypto"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;withComment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;pgTable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"users"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;serial&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;primaryKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;withComment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;notNull&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Login email"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;updatedAt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"updated_at"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;withTimezone&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;defaultNow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;notNull&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Application users"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;touchUsers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;updatedAtTrigger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;updatedAt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;drizzle-kit generate &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; drizzle-pg-extras generate &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; drizzle-kit migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. The trigger catches every update, including the ones that never touch Drizzle: a psql session, a backfill script, another service. &lt;code&gt;.$onUpdate()&lt;/code&gt; can't see those, and a trigger does.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it doesn't fight drizzle-kit
&lt;/h2&gt;

&lt;p&gt;This was the part I cared about most. drizzle-pg-extras doesn't patch Drizzle and never edits a file drizzle-kit wrote. It &lt;strong&gt;appends a normal SQL migration&lt;/strong&gt;, and &lt;code&gt;drizzle-kit migrate&lt;/code&gt; applies it like any other.&lt;/p&gt;

&lt;p&gt;It also keeps its own snapshot, the same way drizzle-kit does for tables. So:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;run &lt;code&gt;generate&lt;/code&gt; again with no changes → nothing is written&lt;/li&gt;
&lt;li&gt;change one trigger's &lt;code&gt;WHEN&lt;/code&gt; clause → you get a migration with only that change&lt;/li&gt;
&lt;li&gt;the next &lt;code&gt;drizzle-kit generate&lt;/code&gt; still reports no schema changes&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;drizzle-pg-extras check&lt;/code&gt; fails CI when someone edits a definition and forgets to generate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And if Drizzle ships all of this natively next month? Your committed SQL still works. You delete one dev dependency and move on. No lock-in.&lt;/p&gt;

&lt;h2&gt;
  
  
  What else it covers
&lt;/h2&gt;

&lt;p&gt;If you've ever...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;...needed a real trigger&lt;/strong&gt;, not just &lt;code&gt;updated_at&lt;/code&gt;: &lt;code&gt;pgFunction&lt;/code&gt; and &lt;code&gt;pgTrigger&lt;/code&gt; do &lt;code&gt;UPDATE OF&lt;/code&gt; columns, a type-checked &lt;code&gt;WHEN&lt;/code&gt;, constraint and deferrable triggers, transition tables and &lt;code&gt;INSTEAD OF&lt;/code&gt; on views.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;...wanted comments to show up in your DB tool&lt;/strong&gt;: &lt;code&gt;withComment&lt;/code&gt; works on tables, columns, enums, views, functions, indexes and constraints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;...forgotten to &lt;code&gt;CREATE EXTENSION&lt;/code&gt; before a migration needed it&lt;/strong&gt;: &lt;code&gt;pgExtension("vector", { schema: "extensions" })&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;...wanted a partitioned table without leaving Drizzle&lt;/strong&gt;: &lt;code&gt;partitionedTable&lt;/code&gt; and &lt;code&gt;pgPartition&lt;/code&gt; for range, list and hash.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;...run TimescaleDB&lt;/strong&gt;: &lt;code&gt;hypertable()&lt;/code&gt; with compression, retention and compression policies. Tested on TimescaleDB 2.32. It's a community package, not official Timescale.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;metricsHypertable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;hypertable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;metrics&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;timeColumn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;metrics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;chunkTimeInterval&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1 day"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;retention&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;dropAfter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"6 months"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;compressionPolicy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;compressAfter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"7 days"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;compression&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;segmentBy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;metrics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deviceId&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The fine print (read this before you install)
&lt;/h2&gt;

&lt;p&gt;I'd rather you hear it from me than from your staging database:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Partitioning only converts an empty table.&lt;/strong&gt; On a fresh migrate that's the normal case. On a table with data, it refuses rather than moving your rows quietly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;drizzle-kit push&lt;/code&gt; doesn't read any of this.&lt;/strong&gt; Generate, then migrate. If you push, &lt;code&gt;renderIdempotent()&lt;/code&gt; gives you a script to run afterwards.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Postgres 14+, Node 18+&lt;/strong&gt;, drizzle-kit 0.31's migration layout. The 1.0 rc layout is best-effort.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No RLS or views.&lt;/strong&gt; drizzle-kit already handles those.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The full "what it does not do yet" list is in the README, and it's long on purpose.&lt;/p&gt;

&lt;p&gt;Smaller packages already solve single pieces of this: &lt;a href="https://github.com/RagedPanda/drizzle-triggers" rel="noopener noreferrer"&gt;drizzle-triggers&lt;/a&gt;, &lt;a href="https://github.com/onozaty/drizzle-db-comments-generator" rel="noopener noreferrer"&gt;@onozaty/drizzle-db-comments-generator&lt;/a&gt;, &lt;a href="https://github.com/Rezarys/drizzle-partition" rel="noopener noreferrer"&gt;drizzle-partition&lt;/a&gt;. If you only need one thing, go look at them too. This is for when you want all of it in one schema with one snapshot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it on your schema
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm install drizzle-pg-extras
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pick the one custom migration you'd most like to delete, declare it next to its table, and run &lt;code&gt;generate&lt;/code&gt;. Compare the SQL it writes with yours.&lt;/p&gt;

&lt;p&gt;It's MIT and brand new. You'd be one of the first people to run it on a schema that isn't mine, and that's exactly what I need. If it breaks, &lt;a href="https://github.com/Robertpaschal/drizzle-pg-extras/issues" rel="noopener noreferrer"&gt;open an issue&lt;/a&gt; with the definition and the migration it wrote, and I'll fix it. If it saves you a custom migration, a ⭐ on &lt;a href="https://github.com/Robertpaschal/drizzle-pg-extras" rel="noopener noreferrer"&gt;the repo&lt;/a&gt; helps the next person find it.&lt;/p&gt;

&lt;p&gt;Your schema should know about your whole database. Now it can.&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>typescript</category>
      <category>opensource</category>
      <category>database</category>
    </item>
    <item>
      <title>On to the next phase</title>
      <dc:creator>Odinaka Robert Nnamani</dc:creator>
      <pubDate>Mon, 16 Nov 2026 13:00:32 +0000</pubDate>
      <link>https://dev.to/robertpaschal/on-to-the-next-phase-154</link>
      <guid>https://dev.to/robertpaschal/on-to-the-next-phase-154</guid>
      <description>&lt;p&gt;On to the next phase&lt;/p&gt;

&lt;p&gt;A project moves to its next phase when the question it has to answer changes. Phase one asks: does it work? Phase two asks: does it hold up when someone else touches it? The code does not announce the change. The work does.&lt;/p&gt;

&lt;p&gt;I built rootmail alone since June, and phase one was mine: my machine, my inbox, my own tests. The SES piece I published in October was phase one thinking made public: an accepted call is not a delivered message, and the check is the work. Then I opened the beta, and the question changed. Eight invite-only seats. Twelve sends a day per organisation. Sandbox limits, confirmed inboxes only. The target is eight testers by November 26, and the work now is not adding features. It is proving the thing behaves when someone else touches it.&lt;/p&gt;

&lt;p&gt;The same change happened with heypascal.me. I launched it in October as a menu, not a portfolio: eight services, prices next to them, a brief form that asks what you need. Phase one was building the site. Phase two is the briefs, and the briefs ask a different question: can someone who has never met me understand what I do well enough to hire me for it?&lt;/p&gt;

&lt;p&gt;Here is what changes when the question changes.&lt;/p&gt;

&lt;p&gt;The checks move first. A feature counts as done when the test that proves it passes, in an environment I do not control. A flag counts as finished when it is removed, not when the feature ships. A limit counts as real when it is written where the user can see it, in the headers and the 429, not when it lives in my head.&lt;/p&gt;

&lt;p&gt;The record becomes the work. In phase one the record was for me: notes, a checklist, the next thing to build. In phase two the record is for the next person: what shipped, what broke, what is next, written where anyone can read it without asking me. The sendlit fix I suggested in an open-source thread landed as a merged pull request last week. I never met the maintainer. The thread was the whole working relationship, and the record was the proof.&lt;/p&gt;

&lt;p&gt;And I stop adding. Phase one rewards adding: one more feature, one more endpoint, one more idea. Phase two punishes it, because every addition is another thing to prove. The discipline of the next phase is subtraction: the flag that comes out, the test that names its own setup, the limit said out loud before launch.&lt;/p&gt;

&lt;p&gt;Nobody hands you a certificate for the next phase. There is no date on it. You decide the question changed, and then you do the work the new question asks for.&lt;/p&gt;

&lt;p&gt;What question is your project answering right now: does it work, or does it hold up? Name the question, not the feature.&lt;br&gt;
Next in this series: Seeking clarity.&lt;/p&gt;

</description>
      <category>buildinpublic</category>
      <category>softwaredevelopment</category>
      <category>startup</category>
    </item>
    <item>
      <title>When your health check takes the system down</title>
      <dc:creator>Odinaka Robert Nnamani</dc:creator>
      <pubDate>Mon, 16 Nov 2026 11:00:56 +0000</pubDate>
      <link>https://dev.to/robertpaschal/when-your-health-check-takes-the-system-down-4e7h</link>
      <guid>https://dev.to/robertpaschal/when-your-health-check-takes-the-system-down-4e7h</guid>
      <description>&lt;p&gt;Everyone worries about the health check that answers 200 while the server is dead. Nobody worries about the one that answers 503 while the server is fine. Last week, the second one helped take down Microsoft 365.&lt;/p&gt;

&lt;p&gt;On November 12, Exchange Online servers started failing automated health checks and were pulled out of service. The servers that were left took the load and overloaded. Servers that restarted failed the checks again immediately. Mailboxes stopped opening in Outlook on the desktop, on the web, and on phones. Teams calendars, SharePoint, and Copilot went with them. Microsoft lists more than 15 affected services. The outage ran just under 24 hours, from about 16:20 UTC on November 12 to 16:10 UTC on November 13.&lt;/p&gt;

&lt;p&gt;Microsoft's preliminary cause is an issue during an earlier network capacity upgrade that surfaced after a later network change, a latent bug in the systems that establish secure connections. It was not an attack and it had nothing to do with AI. The full post-incident report is still to come, so the cause may get sharper. But the shape of the failure is already clear, and the shape is the lesson.&lt;/p&gt;

&lt;p&gt;The health check did what it was written to do. The servers genuinely could not establish secure connections, so the check said so and the load balancer pulled them out. The problem is that nothing in the system could tell "this server is broken" apart from "the thing this server depends on is broken". The dependency was shared, so the check failed everywhere at once, and the load balancer dutifully drained the whole fleet. Every server it removed pushed its connections onto servers that were already short of capacity. The check was the amplifier. It turned a bad hour into a lost day.&lt;/p&gt;

&lt;p&gt;This is the failure mode in the other direction from the one I usually write about. Two days before the outage I posted a thread about health checks that answer 200 while the database is unreachable. That check is a lie: the process is running, so it says yes, while the server cannot serve a single request, and the load balancer keeps sending it traffic until a user reports the error. My check opens a connection to the database and runs a query that touches a real table. It checks the queue the workers read from. If any of them fails, the endpoint answers 503 and the server leaves rotation before users notice. I learned the shape of this from email work, where /health returned 200 while SES was throttling, and the workflow was broken while the status page was green. A check has to validate the real dependencies: queue depth, the SMTP handshake, the bounce and complaint spikes. A health check is a promise that the service can do its job. Make it check the job.&lt;/p&gt;

&lt;p&gt;But a check that tests the job can fail in the other direction too, and that is what Microsoft ran into. A readiness check that touches a shared dependency will fail on every server at the same time when that dependency breaks. The load balancer cannot see the difference between one dead server and fifty healthy servers with the same broken dependency. It only sees fifty failing checks.&lt;/p&gt;

&lt;p&gt;While the pool shrank, the clients kept retrying. That is the second mechanism in this outage, and it is the same one from yesterday's webhook extra: a retry with no backoff and no limit is a sender hammering your endpoint while your handler is already struggling. Retries pour load onto the servers that are still standing, which is exactly the load they cannot take. My rule for webhooks is a limit, backoff, and a dead-letter queue at the end, because a webhook that has failed ten times is not going to succeed on the eleventh. Microsoft reached for the same instinct at planetary scale: it extended the email timeout window to 48 hours, so delayed mail kept retrying gently instead of bouncing. Give the queue time instead of giving up on it.&lt;/p&gt;

&lt;p&gt;Three rules come out of the wreckage.&lt;/p&gt;

&lt;p&gt;First, check the job, not the process. Liveness and readiness are different endpoints. Liveness asks whether the process is running. Readiness asks whether it can do its work. A readiness check touches the database, the queue, the dependency that matters, and answers 503 when any of them fails.&lt;/p&gt;

&lt;p&gt;Second, separate "this instance is broken" from "a shared dependency is down". If one dependency fails everywhere, failing every health check drains the fleet. Check shared dependencies on a separate endpoint that the load balancer does not use to drain servers, or degrade instead of failing. A server that cannot reach one dependency may still serve the requests that do not need it.&lt;/p&gt;

&lt;p&gt;Third, give retries a budget. Backoff, a limit, a dead-letter queue. A retry that never stops is load, not reliability. The handler that can run twice without harm is the safety net; the retry only gives it another chance to answer.&lt;/p&gt;

&lt;p&gt;Go look at your own /health endpoint. If it only checks that the process is running, it is not checking anything. What does yours check?&lt;/p&gt;

&lt;p&gt;If you build systems like this, follow along. I write about the failure modes that only show up when real traffic arrives.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>microsoft</category>
      <category>monitoring</category>
      <category>sre</category>
    </item>
    <item>
      <title>A health check should check what this server owns</title>
      <dc:creator>Odinaka Robert Nnamani</dc:creator>
      <pubDate>Mon, 16 Nov 2026 10:04:31 +0000</pubDate>
      <link>https://dev.to/robertpaschal/when-your-health-check-takes-the-system-down-17e9</link>
      <guid>https://dev.to/robertpaschal/when-your-health-check-takes-the-system-down-17e9</guid>
      <description>&lt;p&gt;A couple of days ago I wrote that a health check should check something real: open a connection to the database, touch a real table, answer 503 if it can't. I still think a health check that only proves the process is running tells you almost nothing.&lt;/p&gt;

&lt;p&gt;But there's a second half to that advice, and skipping it is how a health check takes a whole system down.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ten servers, one database, thirty seconds
&lt;/h2&gt;

&lt;p&gt;Picture ten app servers behind a load balancer. Each one exposes &lt;code&gt;/health&lt;/code&gt;, and &lt;code&gt;/health&lt;/code&gt; runs a query against the shared database. The load balancer checks every few seconds and pulls any server that fails a few checks in a row.&lt;/p&gt;

&lt;p&gt;Now the database has a thirty-second blip. A failover, a connection limit, a slow vacuum. It doesn't matter which.&lt;/p&gt;

&lt;p&gt;Every server's health check fails at the same moment, because every server depends on the same database. The load balancer does exactly what it was told: it marks all ten unhealthy and stops sending them traffic.&lt;/p&gt;

&lt;p&gt;A few things go wrong at once:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Requests that never needed the database (static pages, cached reads, a status page) now fail too, because there's no server left in rotation.&lt;/li&gt;
&lt;li&gt;When the database comes back, the servers don't. The load balancer waits for several consecutive passing checks on each one before re-adding it, so the outage outlasts the blip.&lt;/li&gt;
&lt;li&gt;If an auto scaling group replaces instances that fail load balancer checks, it starts killing healthy servers and launching new ones that will fail the same check.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Nothing about any single server was broken. The health check couldn't tell "this server is sick" from "something every server depends on is sick", and it reacted to both the same way.&lt;/p&gt;

&lt;h2&gt;
  
  
  The failure is correlated
&lt;/h2&gt;

&lt;p&gt;AWS's Builders' Library article on health checks splits them into three kinds: liveness checks (does the process answer?), local health checks (can this server do its own work: disk, threads, config?), and dependency health checks (can it reach the database, cache and other services?). Local failures tend to hit one server at a time. Dependency failures don't. When a shared dependency goes down, it goes down for everyone.&lt;/p&gt;

&lt;p&gt;Their advice is to keep the fast-acting load balancer checks local, and to handle the deeper dependency checks somewhere that can react carefully instead of ejecting the whole fleet.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd do instead
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Split the endpoint.&lt;/strong&gt; One route for the load balancer, one for you.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Routing decision: can THIS server do its own work?&lt;/span&gt;
&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/ready'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ok&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;shuttingDown&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nf"&gt;eventLoopLagMs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;code&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;503&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;ok&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Visibility: how are the things it depends on?&lt;/span&gt;
&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/health/deep'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;probe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sql&lt;/span&gt;&lt;span class="sb"&gt;`select 1 from tenants limit 1`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;queue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;probe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;redis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Every probe has a timeout, so a slow dependency can't hang the check.&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;probe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;unknown&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ms&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;race&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class="nb"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'timeout'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ms&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s1"&gt;'ok'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s1"&gt;'failing'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The load balancer watches &lt;code&gt;/ready&lt;/code&gt;. Dashboards and alerts watch &lt;code&gt;/health/deep&lt;/code&gt;. A database blip now pages a person and shows red on a graph, but it doesn't empty the load balancer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fail open if deep checks must route traffic.&lt;/strong&gt; Some load balancers already do this: if every target fails, they route to all of them anyway, on the theory that a fleet-wide failure is more likely a bad check than a fleet of dead servers. Know whether yours does before you rely on it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Alert on the dependency, not the server.&lt;/strong&gt; If the database is down everywhere, replacing servers can't fix it. Ejecting them only adds a second outage on top of the first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep the check cheap.&lt;/strong&gt; A deep check that runs a query every few seconds on every server adds load to the database exactly when it's struggling. Give each probe a short timeout, and cache the result for a few seconds if your fleet is large.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, should a health check check something real?
&lt;/h2&gt;

&lt;p&gt;Yes, but check the thing this server owns. Route on what one server can fix by being removed. Report on everything else, and let a person, or something that can see the whole fleet, decide what a shared failure means.&lt;/p&gt;

&lt;p&gt;A health check is a promise that this server can do its job. Don't make it promise things about the database it can't keep.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Source: Amazon Builders' Library, &lt;a href="https://aws.amazon.com/builders-library/implementing-health-checks/" rel="noopener noreferrer"&gt;Implementing health checks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I write about the backend checks that catch problems before users do. Follow along if that's your kind of thing.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>architecture</category>
      <category>backend</category>
      <category>sre</category>
    </item>
    <item>
      <title>Accountability and transparency in a remote team</title>
      <dc:creator>Odinaka Robert Nnamani</dc:creator>
      <pubDate>Sun, 15 Nov 2026 13:01:36 +0000</pubDate>
      <link>https://dev.to/robertpaschal/accountability-and-transparency-in-a-remote-team-58nk</link>
      <guid>https://dev.to/robertpaschal/accountability-and-transparency-in-a-remote-team-58nk</guid>
      <description>&lt;p&gt;In a remote team, accountability is a visible record. If I cannot see who owns a task, what done means, and when it was last checked, nobody is accountable. We are just hoping in sync.&lt;/p&gt;

&lt;p&gt;I build alone, and most of the people I build with I have never met in person. Rootmail is mine, solo since June. The coordination I do happens in public issue threads on repos I do not own. This week a fix I suggested in one of those threads landed as a merged pull request. I never met the maintainer. The thread was the whole working relationship: the problem stated, the fix tried, the merge as the proof. When the record is clear, I do not need to ask for status. When it is not, no meeting fixes it.&lt;/p&gt;

&lt;p&gt;Here is what I keep in the record.&lt;/p&gt;

&lt;p&gt;One owner, named next to the task. "The team owns it" means nobody owns it. A task with a name next to it gets done or gets asked about. A task with a group next to it waits.&lt;/p&gt;

&lt;p&gt;Done means a check passed. A bug counts as fixed when the exact steps that broke it stop breaking it. A feature counts as done when the test that proves it passes. I write the check next to the task, in the same place, so anyone can run it without asking me what done means.&lt;/p&gt;

&lt;p&gt;The board is the meeting. I write status down: what shipped, what broke, what is next. Three lines, async, where anyone can read them. A meeting is for the one thing the record cannot settle, not for reading the record out loud.&lt;/p&gt;

&lt;p&gt;Decisions live where the work lives. If a decision is made on a call and never written down, it was not made. I put it in the issue, the doc, the thread. The next person looks there first.&lt;/p&gt;

&lt;p&gt;Wins and misses both go in the record. A missed deadline with the reason written next to it teaches something. A missed deadline nobody mentions teaches people to hide misses.&lt;/p&gt;

&lt;p&gt;I go first. My own progress is visible before I ask anyone else for theirs. I publish what shipped, what broke, and what is next, in the same shape every time. The standard is what I do, not what I ask for.&lt;/p&gt;

&lt;p&gt;What is the one check that would tell you, without asking anyone, whether your team's work is actually moving? Name the check, not the tool.&lt;br&gt;
Next in this series: On to the next phase.&lt;/p&gt;

</description>
      <category>management</category>
      <category>productivity</category>
      <category>remote</category>
    </item>
    <item>
      <title>Daily Coding Wins</title>
      <dc:creator>Odinaka Robert Nnamani</dc:creator>
      <pubDate>Sat, 14 Nov 2026 12:44:47 +0000</pubDate>
      <link>https://dev.to/robertpaschal/daily-coding-wins-2fi1</link>
      <guid>https://dev.to/robertpaschal/daily-coding-wins-2fi1</guid>
      <description>&lt;p&gt;I count a bug fixed when the exact steps that broke it stop breaking it. The edit is the middle of the job, not the end of it. I squashed a bug in React last week, and the satisfying part was not the change. It was running the same steps that broke it and watching them pass.&lt;/p&gt;

&lt;p&gt;Debugging is puzzles, one piece at a time. That is the line I wrote to myself when I started the day, and it held up. Each piece is a fact I can check: what the state was before the break, what changed between the working run and the broken one, what the render did with the value it was given. A piece I cannot check is not a piece. It is a guess wearing a puzzle shape.&lt;/p&gt;

&lt;p&gt;The method is the same one I use on the backend. Reproduce it first, before touching anything. Shrink it until only one thing can be wrong. Change that one thing. Then run the exact steps again. If the steps still break, the fix was a guess, and I say so and keep going. The same discipline sits behind the SES piece I published in October: an accepted call is not a delivered message, and a green run is not a fixed bug. The check is the win, not the edit.&lt;/p&gt;

&lt;p&gt;That is why I keep the wins daily and small. A win I can prove beats a win I can describe. The kind of win I mean: a failing case that now passes, a log line that finally makes sense, a retry that stops duplicating the request. On a bad day, the list is the proof I am moving. On a good day, it is the record of how.&lt;/p&gt;

&lt;p&gt;Write the win down the day it happens, with the check attached. A win without its check fades by the next morning, and then it was never a win. It was a feeling.&lt;/p&gt;

&lt;p&gt;Tell me the smallest win from your week that you can prove: the failing case, and the run where it passed.&lt;br&gt;
Next in this series: Accountability and transparency in a remote team.&lt;/p&gt;

</description>
      <category>coding</category>
      <category>debugging</category>
      <category>programming</category>
      <category>react</category>
    </item>
    <item>
      <title>Progress Updates on Projects</title>
      <dc:creator>Odinaka Robert Nnamani</dc:creator>
      <pubDate>Wed, 11 Nov 2026 13:01:43 +0000</pubDate>
      <link>https://dev.to/robertpaschal/progress-updates-on-projects-17f5</link>
      <guid>https://dev.to/robertpaschal/progress-updates-on-projects-17f5</guid>
      <description>&lt;p&gt;I used to write progress updates that said nothing. "Working on a new feature for the project. Building the backend in Node.js, connecting it to a frontend in React. Can't wait to deploy." I wrote versions of that line for months. It felt like an update. It wasn't. Delete the date and it reads the same any week. Nobody reading it learns anything, including me.&lt;/p&gt;

&lt;p&gt;A progress update is only an update if it names a state change. What was true yesterday that isn't true today? If I can't answer that, I don't have an update. I have a status, and a status is just a mood with a timestamp.&lt;/p&gt;

&lt;p&gt;The shape I use now has three lines: shipped, broke, next. Each one has to name something concrete, or it doesn't go in.&lt;/p&gt;

&lt;p&gt;Shipped is the change. Not the feature, the difference. The send call used to return 200 and mean nothing. The email could be accepted and never arrive, and I wrote a whole piece about that. Now the call returns the state of the message. That is a shipped line, because something works now that didn't before. "Working on the backend" is not a shipped line. Nothing changed.&lt;/p&gt;

&lt;p&gt;Broke is the failure, named plainly. The update that hides the break is the one that costs you later, because the break is still there next week, just unmentioned. Say the pain, not the architecture. "Facing some challenges" is not a broke line. It tells the reader the author is hiding something and tells them nothing else. A broke line says what broke and what it cost, in one line, and then moves on.&lt;/p&gt;

&lt;p&gt;Next is the decision. Not a vibe, a decision: the one thing I'm doing next, and the condition that would change it. "Excited for what's coming" is not a next line. It promises nothing and commits to nothing. A next line commits.&lt;/p&gt;

&lt;p&gt;Why this matters more when you build alone: I don't have a standup. Nobody asks me what changed this week. The update is the standup. Writing it forces the work to move, because if there is nothing to put under shipped, that is the signal. Not a reason to dress the week up. A reason to ask why nothing shipped.&lt;/p&gt;

&lt;p&gt;That is the whole of it. Shipped, broke, next. Three lines, each naming a real change. If the update reads the same with the date deleted, it isn't an update yet.&lt;/p&gt;

&lt;p&gt;I write about backend systems and the decisions hiding inside them. Follow along. Next in this series: Soft Skills for Developers.&lt;/p&gt;

</description>
      <category>buildinpublic</category>
      <category>productivity</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Integrating data governance in agile projects</title>
      <dc:creator>Odinaka Robert Nnamani</dc:creator>
      <pubDate>Tue, 10 Nov 2026 13:00:05 +0000</pubDate>
      <link>https://dev.to/robertpaschal/integrating-data-governance-in-agile-projects-3ace</link>
      <guid>https://dev.to/robertpaschal/integrating-data-governance-in-agile-projects-3ace</guid>
      <description>&lt;p&gt;Data governance sounds like a committee. To me it is a much smaller question, and it is about every record in the system: who owns it, who can read it, and when does it get deleted? If I cannot answer those three, I do not have governance. I have a policy document.&lt;/p&gt;

&lt;p&gt;I build systems where more than one tenant's data lives in the same place, and that is where I learned the shape of this. Governance is not a phase you add at the end of a project. It is a set of decisions that live in the code, checked every sprint, owned by a named person. Here is how I keep it inside an agile project instead of next to it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Name the owner, then measure the gaps.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"Successful governance" means nothing until you can measure it. My version is a count, not a maturity score: how many record types have a named owner, how many records sit with no owner at all, how many access grants are stale, how many retention rules are overdue. The dashboard shows those numbers. If the count of unowned rows is going down sprint over sprint, governance is working. If nobody can see the count, nobody knows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Put the rule in the code, not the document.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Lightweight governance means the check runs where the work happens. Ownership is a column on the record, not a line in a slide. The audit log is written by the service when the access happens, not filled in after the fact. Retention is a job that deletes on a schedule, not a policy that asks someone to remember. When a ticket touches a new kind of data, the ticket carries the data contract with it: these are the records, this is the owner, this is who can read them. If the contract is not in the ticket, the work is not ready.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Show the numbers in the same review as the features.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Progress on governance is invisible unless you make it visible, and a status update is the weakest way to do it. I put the counts in the sprint review next to the features: unowned records shrinking sprint over sprint, stale grants revoked, the retention job ran and deleted what it was supposed to. A dashboard beats a report because nobody has to take my word for it. Early wins matter here more than anywhere — the first time the retention job catches something real, the team stops treating governance as paperwork.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. The person who answers for the data sits in the room.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stakeholders are not a separate committee you report to. They are in sprint planning when the data decisions get made, because that is when the decisions are cheapest to change. The person who owns the customer records is the one who signs off on who can export them. If the owner is not in the room, the decision waits. I would rather delay a ticket than ship a data decision nobody owns — an unowned decision is the one that leaks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. The retrospective covers the data too.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every retro, I ask what leaked, what got over-shared, what the retention rule caught. Governance that never changes is governance nobody is testing. The point of iterating is not to add more rules. It is to remove the ones nobody follows and strengthen the ones that actually caught something. A rule that catches a real over-share is worth ten rules nobody remembers.&lt;/p&gt;

&lt;p&gt;That is the whole of it. Three questions answered in the code, checked every sprint, owned by a named person. Everything else is decoration.&lt;/p&gt;

&lt;p&gt;I write about backend systems and the decisions hiding inside them. Follow along. Next in this series: Progress Updates on Projects.&lt;/p&gt;

</description>
      <category>agile</category>
      <category>architecture</category>
      <category>database</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>CSS</title>
      <dc:creator>Odinaka Robert Nnamani</dc:creator>
      <pubDate>Mon, 09 Nov 2026 12:44:38 +0000</pubDate>
      <link>https://dev.to/robertpaschal/css-4pha</link>
      <guid>https://dev.to/robertpaschal/css-4pha</guid>
      <description>&lt;p&gt;I build backends. On the backend, I decide what runs first. The order is mine to write, mine to read, mine to debug.&lt;/p&gt;

&lt;p&gt;CSS is the one place in the stack where I don't get to decide. The browser decides which rule wins, and it decides by a precedence table I can read but not rewrite. That is the whole thing to understand about CSS. It is not a styling language with quirks. It is a rules engine, and the surprises only look like surprises until you read the table.&lt;/p&gt;

&lt;p&gt;Here is the table, in the order the browser applies it. When two rules disagree about the same element, specificity is the score. An ID selector beats a class selector beats an element selector, no matter where each one sits in the file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.card&lt;/span&gt; &lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;#main&lt;/span&gt; &lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The paragraph is red. Not because the ID rule came last in the file — it could come first and still win. Specificity outranks position. Source order only breaks ties: when two rules have the same specificity, the one that appears later wins. That is the entire conflict-resolution system, and it is deterministic. The browser is never guessing.&lt;/p&gt;

&lt;p&gt;Then there is the escape hatch: !important. It overrides specificity entirely, and it is the one part of the system I treat as a warning sign. It works, and it breaks the system's ability to reason about itself. Once an !important is in the stylesheet, the precedence table has a hole in it — the next person reading the file can't tell which rule wins by reading the table anymore. They have to search for overrides. It is the same failure shape I keep writing about on the backend: the override is invisible to the next reader, so the system fails silently instead of loudly.&lt;/p&gt;

&lt;p&gt;Inheritance is the other half. Some properties flow down to children unless something closer overrides them — color, font. Others don't — margin, padding. It reads like defaults in a config file: the value applies until something nearer says otherwise. Env beats file beats default, parent beats nothing, the closest rule wins. Same shape, different syntax.&lt;/p&gt;

&lt;p&gt;That is why CSS keeps pulling me back even though I live on the backend. Every backend system I build has its own version of this table. Middleware ordering decides which handler sees the request first. Config precedence decides which value the service actually runs with. Retry priority decides which attempt goes first when everything is failing at once. In each case, the system has a deterministic answer for which rule wins, and in each case the bug is almost never in the table. The bug is in my model of the table — I assumed order meant one thing and it meant another.&lt;/p&gt;

&lt;p&gt;So when a style doesn't apply and I can't see why, I don't reach for a bigger hammer. I ask which rule has the higher score, whether the tie was broken by position, and whether something upstream already claimed the win with an override I forgot. The answer is always in the table. It was just in a row I wasn't looking at.&lt;/p&gt;

&lt;p&gt;CSS is a rules engine with a precedence table. Once you read it that way, the surprises stop being surprises.&lt;/p&gt;

&lt;p&gt;I write about backend systems and the decisions hiding inside them. Follow along. Next in this series: Integrating data governance in agile projects.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>backend</category>
    </item>
    <item>
      <title>SSH host key fingerprints and configurations</title>
      <dc:creator>Odinaka Robert Nnamani</dc:creator>
      <pubDate>Sun, 08 Nov 2026 13:01:54 +0000</pubDate>
      <link>https://dev.to/robertpaschal/ssh-host-key-fingerprints-and-configurations-1igl</link>
      <guid>https://dev.to/robertpaschal/ssh-host-key-fingerprints-and-configurations-1igl</guid>
      <description>&lt;p&gt;The first time you SSH into a fresh server, your terminal stops and asks you a question:&lt;/p&gt;

&lt;p&gt;The authenticity of host '203.0.113.10' can't be established. ED25519 key fingerprint is SHA256:9mYvLzQ... Are you sure you want to continue connecting (yes/no)?&lt;/p&gt;

&lt;p&gt;Most people type yes and move on. I used to do the same. Then I stopped to think about what that yes actually means.&lt;/p&gt;

&lt;p&gt;That fingerprint is a hash of the server's host key. It is the one thing proving the machine on the other end is the machine you think it is. The IP address proves nothing — IPs get reassigned, DNS gets pointed at the wrong place, and a network in between can answer for a host that isn't there. The fingerprint is the identity. Typing yes without checking it is trusting a stranger because they answered the door.&lt;/p&gt;

&lt;p&gt;So my rule is simple: I check the fingerprint once, from a place I trust, before I ever type yes.&lt;/p&gt;

&lt;p&gt;The easiest source is the provider. When I spin up a server, the cloud console shows the host key fingerprint for that instance. I copy it, compare it character for character with what the terminal shows, and only then type yes. If they don't match, I stop. No retry, no "probably fine", no clearing known_hosts and trying again. A mismatch is the whole warning system working as designed, and the correct response is to find out why before connecting.&lt;/p&gt;

&lt;p&gt;If the console doesn't show it, I get the fingerprint a different way: ssh-keyscan from a network I already trust, or ssh-keygen -l against the public key file on the server through a channel I already verified. The point is the same — the fingerprint comes from somewhere other than the connection I'm about to trust. Checking the fingerprint against the same untrusted connection proves nothing.&lt;/p&gt;

&lt;p&gt;Once I've verified it, SSH remembers it for me. The fingerprint goes into ~/.ssh/known_hosts on first connect, and from then on every connection is checked silently. That is the part people forget: the first yes is the only one that matters. Every connection after it is just confirming nothing changed.&lt;/p&gt;

&lt;p&gt;And when it does change, SSH will tell you loudly — a big warning about a possible man-in-the-middle, connection refused. Most people's instinct is to delete the old line and reconnect. Sometimes that's right: I rebuilt the server, the host keys were regenerated, the fingerprint legitimately changed. But "sometimes" is doing a lot of work there. When I see that warning, I verify first. Did I actually rebuild this machine? Did the provider rotate the key? If I can't answer yes to something concrete, I don't connect until I can.&lt;/p&gt;

&lt;p&gt;When the change is legitimate, I update the record deliberately: ssh-keygen -R hostname removes the old entry, then I verify the new fingerprint the same way I did the first time and connect. Deliberately, not by deleting the whole known_hosts file because it was faster.&lt;/p&gt;

&lt;p&gt;The other half of this piece is the config file, and it's the boring half that saves the most mistakes. I don't type IP addresses, ports, and key paths from memory. They live in ~/.ssh/config:&lt;/p&gt;

&lt;p&gt;Host api&lt;br&gt;
  HostName 203.0.113.10&lt;br&gt;
  User ubuntu&lt;br&gt;
  Port 2222&lt;br&gt;
  IdentityFile ~/.ssh/api_ed25519&lt;/p&gt;

&lt;p&gt;Now ssh api is the whole command. The port can't be forgotten, the wrong key can't be offered, the username can't be mistyped. Each host gets its own block, each key its own file, and the config is the one place where all of it is written down. A new machine, a fresh checkout of my dotfiles, and I can reach every server I manage without reconstructing anything from memory.&lt;/p&gt;

&lt;p&gt;Two settings I leave alone: StrictHostKeyChecking stays on. The accept-new middle ground looks convenient, but it turns the first connection back into an unchecked yes, which is the exact thing the fingerprint is there to prevent. And I never share one key across everything — one key per purpose, so revoking one doesn't mean re-keying the world.&lt;/p&gt;

&lt;p&gt;None of this is advanced. It's a fingerprint check and a config file. But the fingerprint is the only moment SSH asks you to actually verify the identity of the machine you're about to hand your credentials to, and the config file is what stops the small mistakes that lead to the big ones. I check once, properly, and then I let the tooling do the watching.&lt;/p&gt;

&lt;p&gt;I write about backend systems and the decisions hiding inside them. Follow along. Next in this series: CSS.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>linux</category>
      <category>networking</category>
      <category>security</category>
    </item>
    <item>
      <title>Per-tenant sender reputation on one SES account</title>
      <dc:creator>Odinaka Robert Nnamani</dc:creator>
      <pubDate>Thu, 29 Oct 2026 12:25:48 +0000</pubDate>
      <link>https://dev.to/robertpaschal/per-tenant-sender-reputation-on-one-ses-account-3594</link>
      <guid>https://dev.to/robertpaschal/per-tenant-sender-reputation-on-one-ses-account-3594</guid>
      <description>&lt;p&gt;If you send email on behalf of other businesses, you are holding a shared fuse. One customer imports a stale list, the bounces pile up, and the account that pauses isn't theirs. It's yours, and with it every other customer who did nothing wrong.&lt;/p&gt;

&lt;p&gt;That's the problem I kept circling while building Rootmail, a business email platform where each workspace and sub-tenant sends from its own verified domain with its own DKIM signing key. Separate domains and keys are the visible half of isolation. The half that actually decides whether one customer can hurt another is reputation. For a long time on SES, reputation lived at the account level.&lt;/p&gt;

&lt;p&gt;It doesn't have to anymore. SES now has tenants, and this post is about the one mechanism I'd want a stranger to walk away with: give every customer a tenant, make every send name it, and let the pause land on the tenant instead of the account.&lt;/p&gt;

&lt;h2&gt;
  
  
  What an SES tenant actually is
&lt;/h2&gt;

&lt;p&gt;A tenant is a logical container inside your SES account. You associate resources with it (verified identities, configuration sets, templates), and SES tracks reputation, bounce and complaint rates plus feedback-loop and third-party signals, per tenant.&lt;/p&gt;

&lt;p&gt;Two details make it real rather than cosmetic.&lt;/p&gt;

&lt;p&gt;First, SES checks the association on every send. If the identity, configuration set or template in the request isn't associated with the tenant you named, the send fails. That's a guardrail you get for free: customer A's code path can't quietly sign mail as customer B's domain.&lt;/p&gt;

&lt;p&gt;Second, enforcement is scoped. Each tenant has a reputation policy. &lt;strong&gt;Standard&lt;/strong&gt; (the default) pauses the tenant on high-severity findings, &lt;strong&gt;Strict&lt;/strong&gt; pauses on any finding, and &lt;strong&gt;None&lt;/strong&gt; records findings but never pauses automatically. When a tenant is paused, sends that name it fail. Every other tenant keeps sending.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting one up, in TypeScript
&lt;/h2&gt;

&lt;p&gt;My stack is TypeScript, Postgres, Redis and SES, so this is how I'd wire it with &lt;code&gt;@aws-sdk/client-sesv2&lt;/code&gt;. Onboarding a customer would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;SESv2Client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;CreateTenantCommand&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;CreateTenantResourceAssociationCommand&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@aws-sdk/client-sesv2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ses&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;SESv2Client&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;region&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;us-east-1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ACCOUNT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;AWS_ACCOUNT_ID&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;REGION&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;us-east-1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;provisionTenant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tenantName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;configSet&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ses&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;CreateTenantCommand&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;TenantName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;tenantName&lt;/span&gt; &lt;span class="p"&gt;}));&lt;/span&gt;

  &lt;span class="c1"&gt;// A tenant needs at least one verified identity and one configuration set before it can send.&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;arns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="s2"&gt;`arn:aws:ses:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;REGION&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;ACCOUNT&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:identity/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;`arn:aws:ses:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;REGION&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;ACCOUNT&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:configuration-set/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;configSet&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;];&lt;/span&gt;

  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ResourceArn&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;arns&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ses&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;CreateTenantResourceAssociationCommand&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;TenantName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;tenantName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ResourceArn&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The identity has to be verified first (the domain, its DKIM records, the usual). Association doesn't verify anything. It only grants the tenant permission to use what you've already verified.&lt;/p&gt;

&lt;p&gt;I'd give each customer their own configuration set rather than sharing one. Sharing is allowed, but a dedicated set means event destinations, and anything you read off them, already belong to one tenant without extra tagging.&lt;/p&gt;

&lt;h2&gt;
  
  
  Every send names its tenant
&lt;/h2&gt;

&lt;p&gt;This is the part that's easy to forget in a codebase that predates tenants. The tenant is a field on the request, not something SES infers from the From address:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SendEmailCommand&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@aws-sdk/client-sesv2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;OutboundMessage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;tenantName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;configSet&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;sendForTenant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;OutboundMessage&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;ses&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;SendEmailCommand&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;TenantName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tenantName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;ConfigurationSetName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;configSet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;FromEmailAddress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;Destination&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;ToAddresses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;Content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;Simple&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;Subject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;Data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;subject&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
          &lt;span class="na"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;Data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you send over SMTP instead, the same thing travels as an &lt;code&gt;X-SES-TENANT&lt;/code&gt; header.&lt;/p&gt;

&lt;p&gt;When sending for a tenant you must pass a configuration set associated with it, or use an identity whose default configuration set is associated with it. If you leave both out, you'll find out at send time, not at deploy time. I'd rather have the type system force it, which is why &lt;code&gt;configSet&lt;/code&gt; isn't optional above.&lt;/p&gt;

&lt;h2&gt;
  
  
  Listening for the pause
&lt;/h2&gt;

&lt;p&gt;A tenant that SES pauses is a tenant your app should stop queuing for. Otherwise your workers spend the next hour retrying sends that will all fail. SES publishes tenant events to the EventBridge default bus, so you can route them to an SQS queue or a Lambda.&lt;/p&gt;

&lt;p&gt;There's a subtlety in the event shape worth knowing before you write the handler. The &lt;code&gt;Sending Status Disabled&lt;/code&gt; detail-type fires for both a pause and a reinstatement. The truth is in &lt;code&gt;detail.data.record.status&lt;/code&gt;, which is &lt;code&gt;DISABLED&lt;/code&gt; or &lt;code&gt;REINSTATED&lt;/code&gt;. And that status applies only to the origin named in &lt;code&gt;detail.data.origin&lt;/code&gt;: &lt;code&gt;AWS_SES&lt;/code&gt; if SES changed it, &lt;code&gt;CUSTOMER_MANAGED&lt;/code&gt; if you did. Either origin being disabled stops the tenant.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;TenantStatusEvent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;detail-type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Sending Status Enabled&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Sending Status Disabled&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;resources&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[];&lt;/span&gt; &lt;span class="c1"&gt;// tenant ARN&lt;/span&gt;
  &lt;span class="nl"&gt;detail&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;origin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;AWS_SES&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;CUSTOMER_MANAGED&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="c1"&gt;// ENABLED arrives with "Sending Status Enabled"; this handler only needs to know whether it is DISABLED.&lt;/span&gt;
      &lt;span class="nl"&gt;record&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ENABLED&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;DISABLED&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;REINSTATED&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;cause&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./db&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// a pg Pool&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;onTenantStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;evt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TenantStatusEvent&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tenantArn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;evt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resources&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;origin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;record&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;evt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;detail&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Don't branch on detail-type alone: "Disabled" also covers REINSTATED.&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;blocked&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;DISABLED&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;`insert into tenant_send_gate (tenant_arn, origin, blocked, cause, updated_at)
     values ($1, $2, $3, $4, now())
     on conflict (tenant_arn, origin)
     do update set blocked = $3, cause = $4, updated_at = now()`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;tenantArn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;origin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;blocked&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cause&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keeping one row per origin mirrors how SES itself reasons about it. A tenant can send only when no origin is blocked. If you'd rather not reconstruct that yourself, &lt;code&gt;GetReputationEntity&lt;/code&gt; returns the combined value as &lt;code&gt;SendingStatusAggregate&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In this wiring, the queue worker checks that gate before it calls SES, right next to the suppression check. In Rootmail, every send already runs a suppression check first, and a provider event goes into the message's append-only lifecycle log as evidence of what the system observed, not as proof that someone read anything. A tenant pause is one more piece of that evidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Suppression is shared unless you say otherwise
&lt;/h2&gt;

&lt;p&gt;This one surprised me. By default, every tenant shares the account-level suppression list. If a recipient hard-bounces on customer A's mail, that address is suppressed for customer B too, even though B may have a perfectly good relationship with them.&lt;/p&gt;

&lt;p&gt;SES supports tenant-level suppression lists. You set the scope to &lt;code&gt;TENANT&lt;/code&gt; and choose whether bounces, complaints or both are tracked. Then one tenant's bounce stays that tenant's problem. Whether that's what you want depends on your product, but it should be a decision, not a default you discover later.&lt;/p&gt;

&lt;h2&gt;
  
  
  What isolation doesn't buy you
&lt;/h2&gt;

&lt;p&gt;Here are the edges, all from the SES docs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The account still carries the sum.&lt;/strong&gt; Tenant tracking isolates reputation, but AWS says plainly that combined tenant activity still affects your overall account standing. A badly behaved tenant can still put the account at risk. Tenants contain the blast radius; they don't remove your responsibility to watch it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Findings need volume.&lt;/strong&gt; Some reputation findings only trigger after a minimum representative volume, and metrics are calculated over rolling windows from about 24 hours to 7 days. A tenant that sends a little won't show a finding quickly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tenants are regional and flat.&lt;/strong&gt; They don't replicate across regions, they don't nest, and they can't span accounts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;There's a per-tenant charge.&lt;/strong&gt; It's on the SES pricing page. Factor it in before mapping every end user to a tenant.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And the edge I live with every day: none of this matters to outbound mail until your account leaves the SES sandbox. In the sandbox you can send only to verified addresses and the mailbox simulator. Rootmail's SES account is still in the sandbox. My production access request was denied, and I'm reapplying with a clean sending history. So the beta is honest about that: testers send only to their own AWS-confirmed inboxes and the simulator, capped at 12 sends a day per org. The tenant wiring works the same either way; what's missing is real recipients.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this leaves you
&lt;/h2&gt;

&lt;p&gt;If you're building something multi-tenant on SES (a booking tool, a CRM, a clinic system, an agency sending for clients), the mechanism is small: one tenant per customer, a configuration set associated with it, &lt;code&gt;TenantName&lt;/code&gt; on every send, an EventBridge rule that closes your own gate when SES closes theirs, and a deliberate choice about suppression scope.&lt;/p&gt;

&lt;p&gt;Rootmail is built around that problem: workspaces and sub-tenants with their own verified domains, signing keys and isolated reputation, behind one API. The closed beta has 8 seats, with the sandbox limits above stated plainly. The code in this post is how I'd wire the SES side, not a copy of Rootmail's. If you send for other people and want to try it, testers confirm Amazon's verification email within 24 hours, and places are open at &lt;a href="https://rootmail.io/beta?ref=devto" rel="noopener noreferrer"&gt;https://rootmail.io/beta?ref=devto&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>email</category>
      <category>saas</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
