<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Iliyan Slavov</title>
    <link>https://iliyanslavov.com/</link>
    <description>Iliyan Slavov — engineer building AI infrastructure and useful software. Posts on engineering and technology.</description>
    <language>en</language>
    <lastBuildDate>Tue, 17 Nov 2026 16:16:47 +0000</lastBuildDate>
    <pubDate>Tue, 17 Nov 2026 16:16:47 +0000</pubDate>
    <atom:link href="https://iliyanslavov.com/rss.xml" rel="self" type="application/rss+xml"></atom:link>
    <image>
      <url>https://iliyanslavov.com/static/images/iliyan-minimalistic.png</url>
      <title>Iliyan Slavov</title>
      <link>https://iliyanslavov.com/</link>
    </image>
    <item>
      <title>Write-ahead log (WAL)</title>
      <link>https://iliyanslavov.com/posts/write-ahead-log/</link>
      <guid isPermaLink="true">https://iliyanslavov.com/posts/write-ahead-log/</guid>
      <pubDate>Tue, 28 Oct 2025 00:00:00 +0000</pubDate>
      <dc:creator>Iliyan Slavov</dc:creator>
      <description>How databases turn a commit into a durable promise through write-ahead logging, fsync trade-offs, and defensive record formats.</description>
      <content:encoded>&lt;p&gt;&lt;img src=&#34;https://iliyanslavov.com/static/images/write-ahead-log.svg&#34; alt=&#34;Write-ahead log cover&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;When a database tells us a transaction has committed, we take it at its word. The money was transferred. The order was placed. The medical record was saved. We expect that data to survive a crash, a power outage, or a reboot.&lt;/p&gt;&#xA;&lt;p&gt;That expectation is called durability. It is one of the ACID guarantees that databases are famous for. Like other ideas in computing, it sounds simple until you look closely. Then you find a chain of careful engineering decisions, each trading off speed against safety.&lt;/p&gt;&#xA;&lt;p&gt;The WAL is at the center of most of those decisions. The idea is straightforward. Before a database reports that a transaction succeeded, it writes a record of the change to a log. But making that idea work in practice means dealing with operating systems, storage hardware, record formats, and corruption. Different systems make that bet differently.&lt;/p&gt;&#xA;&lt;h2&gt;Logs&lt;/h2&gt;&#xA;&lt;p&gt;A log is one of the simplest data structures there is. It is an ordered, append-only sequence of records. We use logs in server software, audit systems, and error reporting. In a database, a log is more than debugging. It is the source of truth.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://iliyanslavov.com/static/images/write-ahead-log-logs.svg&#34; alt=&#34;A sequential log&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The order of records matters because a log is a timeline. If you know every event that happened, you can reconstruct the state. This is why logs survive crashes better than indexes or tables. A half-written index page is ambiguous. A log with the last record incomplete is not. You replay up to the last complete record and stop. Records are never overwritten, so there is no partially updated state to reason about.&lt;/p&gt;&#xA;&lt;p&gt;A database could write changes directly to its main files, but those files are optimized for reading. They have pages, indexes, and free-space maps. Updating them is complex and slow. A log is optimized for one operation. Append.&lt;/p&gt;&#xA;&lt;p&gt;Append is fast, simple, and durable. Because the log only grows at the end, writes are sequential. Sequential writes avoid the seek penalty of spinning disks and reduce write amplification on SSDs. This is why append-only logs outperform random updates.&lt;/p&gt;&#xA;&lt;h2&gt;Write-ahead logging&lt;/h2&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://iliyanslavov.com/static/images/write-ahead-log-before-db.svg&#34; alt=&#34;WAL before database&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Every insert, update, and delete becomes a WAL record. The record is the unit of durability. It holds a transaction ID, an operation type, and the changed data. It is enough information to redo the operation later.&lt;/p&gt;&#xA;&lt;p&gt;For example, a record might say that transaction 42 changed row 123 in the users table. It updated the name from Alice to Bob. After a crash, the database can replay that record and restore the change.&lt;/p&gt;&#xA;&lt;p&gt;WAL records are small. A single row change might touch a few hundred bytes. Updating the main table file would mean reading and writing an entire page, plus updating every index that points to that row. A page is a fixed-size block of data. 4 KB and 8 KB are common sizes. The log absorbs the change cheaply.&lt;/p&gt;&#xA;&lt;p&gt;The record goes to the log first. Only then does the transaction count as committed.&lt;/p&gt;&#xA;&lt;p&gt;Commit is a contract. Before commit, the user can still change their mind. After commit, the database must keep its promise. The WAL record is that promise in writing.&lt;/p&gt;&#xA;&lt;p&gt;The WAL holds the truth. Once a transaction commits, its data is visible even before it reaches the main database files. Readers can look in the WAL.&lt;/p&gt;&#xA;&lt;h2&gt;Checkpoints&lt;/h2&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://iliyanslavov.com/static/images/write-ahead-log-checkpoints.svg&#34; alt=&#34;Checkpoint&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Eventually the WAL has to reach the main database files. That happens during a checkpoint. A checkpoint copies committed changes from the log into the database.&lt;/p&gt;&#xA;&lt;p&gt;Checkpoints do not run on every commit. That would be too slow. They fire when the WAL grows beyond a size limit or when enough time has passed. SQLite defaults to 1000 pages of WAL data. PostgreSQL has its own thresholds. The exact numbers do not matter as much as the pattern.&lt;/p&gt;&#xA;&lt;p&gt;If checkpoints never ran, the WAL would grow forever. Recovery would take forever. Disk space would disappear.&lt;/p&gt;&#xA;&lt;p&gt;Checkpoints do not stop the world. While the checkpoint copies pages to the database file, new transactions keep writing to the WAL. The checkpoint records a position in the log. Recovery knows that everything before that position has been copied. Everything after still needs to be replayed.&lt;/p&gt;&#xA;&lt;h2&gt;The path to persistent storage&lt;/h2&gt;&#xA;&lt;p&gt;Writing to disk sounds final. It is not.&lt;/p&gt;&#xA;&lt;p&gt;Between your application and persistent storage sit three layers of volatile memory. Each one can lose data.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://iliyanslavov.com/static/images/write-ahead-log-data-path.svg&#34; alt=&#34;Path to durable storage&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Each layer is a place where data can disappear.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;WAL buffer. This is application memory. Records land here before anything else. A crash here wipes them out. It is the fastest layer and the least safe.&lt;/li&gt;&#xA;&lt;li&gt;Operating system page cache. A &lt;code&gt;write()&lt;/code&gt; call puts data here. The OS decides when to flush it. Maybe now. Maybe in a minute. Without &lt;code&gt;fsync&lt;/code&gt;, the decision is not yours. The page cache is seductive. &lt;code&gt;write()&lt;/code&gt; returns quickly because it only copies data into kernel memory. The OS can reorder writes, merge them, and delay them. This is great for performance and terrible for durability.&lt;/li&gt;&#xA;&lt;li&gt;Storage device cache. Disks and SSDs buffer writes too. Unless the cache is battery-backed, a power loss destroys it. Some disks even lie about &lt;code&gt;fsync&lt;/code&gt;, reporting success before the data is truly safe. The database has to know this and compensate.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Only the last layer counts. That is the physical disk, the flash cells, the platters. Once data lives there, it survives power loss. The word durable means reaching persistent storage. Nothing else counts.&lt;/p&gt;&#xA;&lt;p&gt;Developers learn this the hard way. They call &lt;code&gt;write()&lt;/code&gt;. They call &lt;code&gt;flush()&lt;/code&gt;. They think the data is safe. It is only in the page cache. A power outage erases it. The database has to force the data through every layer. The tool for that is &lt;code&gt;fsync&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2&gt;fsync strategies&lt;/h2&gt;&#xA;&lt;p&gt;The only operation that forces data all the way to persistent storage is &lt;code&gt;fsync&lt;/code&gt;. It is also expensive.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;fsync&lt;/code&gt; blocks. It waits for the physical disk. Milliseconds, sometimes seconds. In database time, that is an eternity. The slowness comes from hardware. A spinning disk has to seek the right track and wait for the platter to rotate. An SSD has to erase blocks before writing new data. The operating system may also have to flush other dirty pages that happened to be waiting.&lt;/p&gt;&#xA;&lt;p&gt;So every database faces the same question. When do you call &lt;code&gt;fsync&lt;/code&gt;?&lt;/p&gt;&#xA;&lt;h3&gt;Immediate persistence&lt;/h3&gt;&#xA;&lt;p&gt;With immediate persistence, every write calls &lt;code&gt;fsync&lt;/code&gt; and blocks until the data reaches persistent storage before returning success.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://iliyanslavov.com/static/images/write-ahead-log-immediate.svg&#34; alt=&#34;Immediate persistence&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The guarantee is the strongest possible. If the system crashes, you lose at most the operation in progress. Everything before that is safe.&lt;/p&gt;&#xA;&lt;p&gt;The cost is brutal. A thousand writes mean a thousand &lt;code&gt;fsync&lt;/code&gt; calls. Threads wait. Throughput dies. Disk I/O becomes the bottleneck.&lt;/p&gt;&#xA;&lt;p&gt;Immediate persistence is the right choice when you cannot afford to lose anything. Financial ledgers, medical records, anything where a missing row is a lawsuit.&lt;/p&gt;&#xA;&lt;h3&gt;Batch persistence&lt;/h3&gt;&#xA;&lt;p&gt;With batch persistence, the system buffers records in memory and calls &lt;code&gt;fsync&lt;/code&gt; once for the whole batch.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://iliyanslavov.com/static/images/write-ahead-log-batch.svg&#34; alt=&#34;Batch persistence&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The speedup is large. A thousand appends become memory operations. One &lt;code&gt;fsync&lt;/code&gt; saves them all. Sequential writes are also kinder to disks than scattered tiny writes.&lt;/p&gt;&#xA;&lt;p&gt;But the group is the unit of safety. A crash before the &lt;code&gt;fsync&lt;/code&gt; loses the whole group. The batch size becomes a dial. Smaller batches lose less data but call &lt;code&gt;fsync&lt;/code&gt; more times. Larger batches amortize the cost but widen the loss window. There is no free setting.&lt;/p&gt;&#xA;&lt;p&gt;Batch persistence fits systems where operations already belong together. A logging service, a metrics pipeline, a job queue. Losing the batch is bad, but losing one record out of a batch is worse because it leaves the system inconsistent.&lt;/p&gt;&#xA;&lt;h3&gt;Interval-based persistence&lt;/h3&gt;&#xA;&lt;p&gt;With interval-based persistence, a background thread handles the &lt;code&gt;fsync&lt;/code&gt; at fixed intervals or when the buffer reaches a size threshold.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://iliyanslavov.com/static/images/write-ahead-log-interval.svg&#34; alt=&#34;Interval persistence&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The main thread appends and returns immediately. A separate thread writes and &lt;code&gt;fsync&lt;/code&gt;s every second, or every megabyte. Writes never block. Throughput is excellent.&lt;/p&gt;&#xA;&lt;p&gt;The buffer size and timer interval are the two main dials. A 1MB buffer with a 1-second timer is a common starting point. If the buffer fills before the timer fires, the thread flushes early. If the timer fires first, it flushes whatever is there. Either condition can trigger the sync.&lt;/p&gt;&#xA;&lt;p&gt;The risk is bounded and known. You might lose the last two seconds of data. The timer is a promise to the user, not a guarantee from physics. If the database crashes one millisecond before the next sync, that data is gone. The user knows the window and accepts the bet.&lt;/p&gt;&#xA;&lt;p&gt;Interval persistence fits systems where throughput matters more than individual records. Click streams, analytics events, sensor data. The user cares about the aggregate, not the single event. A two-second window of loss is acceptable.&lt;/p&gt;&#xA;&lt;p&gt;Each approach chooses a different answer to the same question. How much data can I afford to lose? There is no best approach. Only the right trade-off for your system.&lt;/p&gt;&#xA;&lt;h2&gt;Record structure&lt;/h2&gt;&#xA;&lt;p&gt;The log file itself has to be defensive.&lt;/p&gt;&#xA;&lt;p&gt;Disks fail. Power cuts out mid-write. Silent corruption happens more than developers want to believe. The WAL has to detect corruption, not assume the data is intact.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://iliyanslavov.com/static/images/write-ahead-log-record.svg&#34; alt=&#34;Binary record format&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The first instinct is JSON. It is readable and familiar. But it is the wrong tool for a WAL.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It has no record boundaries. A corrupt byte can fake a closing brace or a newline.&lt;/li&gt;&#xA;&lt;li&gt;It is larger than binary.&lt;/li&gt;&#xA;&lt;li&gt;It is slower to parse.&lt;/li&gt;&#xA;&lt;li&gt;It has no built-in way to prove the bytes are intact.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Production systems use a binary format. Every record starts with a fixed-size header. The header says how long the record is. Recovery reads the length, reads exactly that number of bytes, and moves on. No guessing. No scanning for delimiters.&lt;/p&gt;&#xA;&lt;p&gt;The length field is the most important byte in the record. It turns an unstructured stream into a sequence of discrete facts. A corrupt length field is fatal. If the header is damaged, recovery does not know the record size and has to stop.&lt;/p&gt;&#xA;&lt;p&gt;The header carries a checksum. Before writing, the database hashes the bytes. After reading, it hashes again. A mismatch means corruption. Stop. Or skip. But do not trust.&lt;/p&gt;&#xA;&lt;p&gt;When corruption is detected, the database has a choice. It can truncate the log at the bad record and continue, losing everything after that point. Or it can halt and ask an administrator to decide. The right choice depends on the system. A banking database should halt. A metrics database might truncate and keep going.&lt;/p&gt;&#xA;&lt;p&gt;The checksum covers the entire record, not only the payload. A flipped bit in the header is as dangerous as a flipped bit in the data. The database has to distrust every byte.&lt;/p&gt;&#xA;&lt;p&gt;The transaction ID groups records from the same transaction. This is how atomicity survives a crash. Either the whole transaction replays, or none of it does.&lt;/p&gt;&#xA;&lt;p&gt;CRC32 is a common checksum. It is fast, and hardware accelerates it. It catches bit flips and burst errors. That is all you need for accidental corruption.&lt;/p&gt;&#xA;&lt;h2&gt;Conclusion&lt;/h2&gt;&#xA;&lt;p&gt;When a database says committed, it is not saying magic happened. It is saying the system paid the cost you agreed to pay.&lt;/p&gt;&#xA;&lt;p&gt;The WAL is where you write down the terms.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Applying Inbox Zero to engineering team</title>
      <link>https://iliyanslavov.com/posts/applying-inbox-zero-to-engineering-team/</link>
      <guid isPermaLink="true">https://iliyanslavov.com/posts/applying-inbox-zero-to-engineering-team/</guid>
      <pubDate>Sat, 09 Nov 2024 00:00:00 +0000</pubDate>
      <dc:creator>Iliyan Slavov</dc:creator>
      <description>How an engineering team applied Inbox Zero to turn a chaotic inbox into a clean, manageable tool.</description>
      <content:encoded>&lt;p&gt;&lt;img src=&#34;https://iliyanslavov.com/static/images/applying-inbox-zero-to-engineering-team.svg&#34; alt=&#34;Applying Inbox Zero to engineering team&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We are an engineering team building a product, and our inboxes stay open all day. Client communications, system alerts, and tool notifications pour in constantly. Feature requests add to the pile.&lt;/p&gt;&#xA;&lt;p&gt;Deep work is hard.&lt;/p&gt;&#xA;&lt;p&gt;We apply Inbox Zero to the team. This is how it works.&lt;/p&gt;&#xA;&lt;h2&gt;The mess&lt;/h2&gt;&#xA;&lt;p&gt;Our inboxes hold hundreds of emails. All of these pile together:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Client communications&lt;/li&gt;&#xA;&lt;li&gt;Tool notifications (Jira, GitHub, etc.)&lt;/li&gt;&#xA;&lt;li&gt;System alerts&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The inbox is noisy. Important emails are hard to find.&lt;/p&gt;&#xA;&lt;p&gt;That chaos steals focus from the whole team.&lt;/p&gt;&#xA;&lt;p&gt;Something has to change.&lt;/p&gt;&#xA;&lt;h2&gt;Archive everything&lt;/h2&gt;&#xA;&lt;p&gt;The first step is to archive every email in every inbox.&lt;/p&gt;&#xA;&lt;p&gt;Some team members worry when we suggest archiving. What if they need a conversation later?&lt;/p&gt;&#xA;&lt;p&gt;But archiving does not delete. It moves emails to the Archive folder. Search still finds them.&lt;/p&gt;&#xA;&lt;p&gt;The inbox goes empty. It feels like the weight fell off the shoulders.&lt;/p&gt;&#xA;&lt;h2&gt;Three folders&lt;/h2&gt;&#xA;&lt;p&gt;Next we create three folders.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;Read&lt;/code&gt; for emails to refer back to&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Urgent&lt;/code&gt; for priority items and system alerts&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Pending&lt;/code&gt; for things waiting on others&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;That is all.&lt;/p&gt;&#xA;&lt;h2&gt;Process from the bottom&lt;/h2&gt;&#xA;&lt;p&gt;Now emails get processed from the bottom up. Start with the oldest message and make a quick decision.&lt;/p&gt;&#xA;&lt;p&gt;Is it urgent? Move it to &lt;code&gt;Urgent&lt;/code&gt; or handle it now.&lt;/p&gt;&#xA;&lt;p&gt;Is it something to read later? Move it to &lt;code&gt;Read&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Is it waiting on someone else? Move it to &lt;code&gt;Pending&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Is it noise? Delete or archive it.&lt;/p&gt;&#xA;&lt;p&gt;Then move to the next email. Keep going until you process them all.&lt;/p&gt;&#xA;&lt;h2&gt;Pin or star&lt;/h2&gt;&#xA;&lt;p&gt;Some emails need to stay visible. We pin or star urgent items, priority threads, and conversations that span across weeks. The email client puts those messages at the top, so they stay visible.&lt;/p&gt;&#xA;&lt;h2&gt;Let filters sort&lt;/h2&gt;&#xA;&lt;p&gt;Email filters are rules that act on incoming messages automatically. They move, delete, flag, or label emails based on the sender, subject, or keywords.&lt;/p&gt;&#xA;&lt;p&gt;We use two filters.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The first archives automated updates from tools.&lt;/li&gt;&#xA;&lt;li&gt;The second moves emails from key clients and bug reports into &lt;code&gt;Urgent&lt;/code&gt; so they stay visible.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The filters cut the noise and keep what needs attention.&lt;/p&gt;&#xA;&lt;h2&gt;Schedule email checks&lt;/h2&gt;&#xA;&lt;p&gt;The team checks email four times a day. Morning, before lunch, after lunch, and late afternoon.&lt;/p&gt;&#xA;&lt;p&gt;Between checks, email stays closed. Most emails can wait two hours.&lt;/p&gt;&#xA;&lt;p&gt;What if something critical slips in and waits until the next check? In our case, real critical issues reach us through different channels, not email.&lt;/p&gt;&#xA;&lt;h2&gt;The outcome&lt;/h2&gt;&#xA;&lt;p&gt;We went from ten thousand emails in the inbox to a clean inbox. It is not magic.&lt;/p&gt;&#xA;&lt;p&gt;It takes a little organization and maintenance, but the payoff is drastic.&lt;/p&gt;&#xA;&lt;p&gt;The inbox is no longer a source of stress. It is a tool the team controls.&lt;/p&gt;&#xA;&lt;p&gt;Close it. Get back to shipping.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Software architecture is not about patterns</title>
      <link>https://iliyanslavov.com/posts/software-architecture-is-not-about-patterns/</link>
      <guid isPermaLink="true">https://iliyanslavov.com/posts/software-architecture-is-not-about-patterns/</guid>
      <pubDate>Thu, 07 Nov 2024 00:00:00 +0000</pubDate>
      <dc:creator>Iliyan Slavov</dc:creator>
      <description>Architecture is not about collecting patterns. It is about understanding the problem, forcing trade-offs, and choosing simple, maintainable tools.</description>
      <content:encoded>&lt;p&gt;&lt;img src=&#34;https://iliyanslavov.com/static/images/software-architecture-is-not-about-patterns.svg&#34; alt=&#34;Software architecture is not about patterns&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Most software architecture books answer questions no one asked.&lt;/p&gt;&#xA;&lt;p&gt;They give you microservices, serverless, event sourcing, and service mesh. They give you layers, events, micro-kernels, brokers, and mediators. They give you compensating transactions, context maps, and diagrams.&lt;/p&gt;&#xA;&lt;p&gt;Those are real things. They are patterns for specific problems. But they are not architecture itself. Knowing the terms is not the same as making a decision.&lt;/p&gt;&#xA;&lt;h2&gt;The right questions&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What is the real problem?&lt;/li&gt;&#xA;&lt;li&gt;What does this system do for its users?&lt;/li&gt;&#xA;&lt;li&gt;What happens when it breaks?&lt;/li&gt;&#xA;&lt;li&gt;What does failure cost?&lt;/li&gt;&#xA;&lt;li&gt;What is the simplest thing that could work?&lt;/li&gt;&#xA;&lt;li&gt;Which choices are hard to undo?&lt;/li&gt;&#xA;&lt;li&gt;What can the team build and run?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Those are the fundamentals.&lt;/p&gt;&#xA;&lt;p&gt;The rest is detail.&lt;/p&gt;&#xA;&lt;h2&gt;The details can wait&lt;/h2&gt;&#xA;&lt;p&gt;When a requirement is not clear, do not guess. Ask what business outcome it serves. Ask which constraints come from the real world and which come from the existing system.&lt;/p&gt;&#xA;&lt;p&gt;Model the domain before the data.&lt;/p&gt;&#xA;&lt;p&gt;Draw a context diagram first. Then peel the onion.&lt;/p&gt;&#xA;&lt;p&gt;Write down every choice. Capture the why, not just the what.&lt;/p&gt;&#xA;&lt;p&gt;You cannot optimize everything. Pick the qualities that matter. Drop the ones that do not. If everything is a priority, nothing is.&lt;/p&gt;&#xA;&lt;h2&gt;Start simple and battle-tested&lt;/h2&gt;&#xA;&lt;p&gt;The best architecture is one the team can understand, build, and maintain.&lt;/p&gt;&#xA;&lt;p&gt;Trendy is not an advantage.&lt;/p&gt;&#xA;&lt;p&gt;Start with what is proven. A relational database. A monolith on a single server. A single region with backups.&lt;/p&gt;&#xA;&lt;p&gt;Boring choices scale far more than you think. But the real reason to choose them is maintenance. They are also cheap to run.&lt;/p&gt;&#xA;&lt;p&gt;Move to more complex architectures only when the problem truly forces you.&lt;/p&gt;&#xA;&lt;p&gt;Build for your problems and your scale, not Google’s, Meta’s, Anthropic’s, or OpenAI’s.&lt;/p&gt;&#xA;&lt;p&gt;Complex architecture has its place. Most teams do not need it.&lt;/p&gt;&#xA;&lt;h2&gt;The point&lt;/h2&gt;&#xA;&lt;p&gt;The goal is not an impressive diagram. It is software that solves the problem. Easy to live with. Easy to test. Easy to deploy. Easy to reason about.&lt;/p&gt;&#xA;&lt;p&gt;Architecture is not about using or knowing every pattern.&lt;/p&gt;&#xA;&lt;p&gt;It is about making the right bet and leaving room to change your mind.&lt;/p&gt;&#xA;</content:encoded>
    </item>
  </channel>
</rss>
