How to think like a software architect

One feature, three different minds. How a junior developer, a senior engineer and an architect each approach the same problem, and the habits that take you from one to the next.

Three people standing on three rising steps. The junior developer on the lowest step says "It works in my tests!". The senior engineer on the middle step asks "What happens under load?". The architect on the top step asks "What could go wrong, and what are we giving up?".
Fig. 1 — Same feature, three questions. The higher the step, the further ahead the question looks.

A feature has just been finished. Three people look at it.

The junior developer says: “Done! It works in my tests.”

The senior engineer asks: “Nice. What about edge cases? What happens under load?”

The architect asks: “Wait. Why are we building this? What could go wrong? And what are we giving up by doing it this way?”

Same feature. Three very different ways of thinking.

Being an architect is not about being “better” than a developer, and it is not a job title you wait for. It is a way of thinking that you can start practising today. It means thinking one level higher than the code, seeing problems before they happen, and making choices that will still look sensible in two years.

This article shows that change in thinking on one real example, then gives you four habits to practise.

Why code-level thinking is not enough

When you write a feature, the problem is small and clear: make login work. You think in classes, functions and tests.

When you design a system, the problem is bigger: make login work for 10 million people, keep attackers out, stay up when a server dies, and stay easy to change when the business changes its mind.

Those are different problems, and they need different thinking, for five reasons:

  • Systems outlive features. Code gets rewritten next quarter. Architecture decisions stay with the team for years.
  • Scale exposes everything. What works for 100 users can fall over badly at 100,000.
  • Failure is guaranteed. Servers crash, networks drop packets, databases go down. The only question is when.
  • Every choice costs something. You always give something up. The skill is choosing what, on purpose.
  • Requirements move. Today’s perfect design is often tomorrow’s bottleneck.

One feature, three minds

Let’s take one real problem and watch all three people solve it: build a video streaming platform. Users upload videos. Other users watch them.

The junior developer: “make it work”

The junior developer thinks in steps: take the uploaded file, save it, send it back when someone presses play.

// Java · VideoController.java (the first version)
@PostMapping("/upload")
public String upload(@RequestParam MultipartFile file) throws IOException {
    Video video = new Video();
    // the whole video goes into the database
    video.setContent(file.getBytes());
    videoRepository.save(video);
    return "Uploaded";
}

@GetMapping("/stream/{id}")
public byte[] stream(@PathVariable Long id) {
    // the whole video is loaded into memory
    return videoRepository.findById(id).orElseThrow().getContent();
}

Give it credit: it works, it is simple, and it was quick to write. For ten users, it is fine.

Now picture a 2 GB video and a few hundred viewers. Every video sits inside the database, which keeps growing and slowing down. Every play loads the whole file into the server’s memory, so a few viewers at once can crash it. There is no plan for slow networks, half-finished uploads, or different screen sizes.

The senior engineer: “make it work well”

The senior engineer has been burned before and fixes the obvious problems:

  • Big files go to object storage (like Amazon S3), not the database. The database only keeps small metadata: title, size, owner.
  • Video is streamed in chunks (say 1 MB at a time), so memory use stays flat.
  • Popular videos get a cache, and failures get proper error handling.

This is a real improvement, and many teams stop here. But some hard questions are still open:

  • What happens when S3 is slow or down?
  • What happens when one video goes viral and a million people press play at once?
  • Who converts each upload into 360p, 720p and 1080p for slow and fast connections?
  • If a user’s Wi-Fi drops at 90% of a 2 GB upload, do they start again from zero?

The architect: “make it survive reality”

The architect does not start with code at all. They start with questions, roughly in this order:

Five numbered cards in a row. 1 Requirements: what are we really solving? 2 Failures: what could go wrong? 3 Scale: how many users, how much data? 4 Trade-offs: what are we giving up? 5 Evolution: how will this need to change?
Five questions, in this order. Each answer changes the design.

Applied to the video platform, the answers change the design completely:

  • Requirements. People watch far more than they upload, maybe 100 views per upload. So the watch path matters most, and it has to start playing in under two seconds.
  • Failures. Uploads will break halfway, so they must be resumable. Video processing will sometimes fail, so it needs retries and a place for failed jobs to wait. A whole storage region can go down.
  • Scale. Millions of users, petabytes of video over time, sudden spikes when something goes viral.
  • Trade-offs. Storing three qualities triples storage cost, but people on slow networks can still watch. Does the view count need to be exact, right now? No. Being slightly behind is fine, and it saves a lot of database work.
  • Evolution. Upload and watch first. Recommendations later. Live streaming is a different system, so leave room for it rather than building it now.

That thinking produces a very different shape:

Three panels side by side. Developer: client, app server, and a database holding the video bytes, marked as the breaking point. Senior engineer: client, app server, with S3 for files, a database for metadata and a Redis cache, with open questions about failure and scale. Architect: an upload path from client through an upload service to S3, then a Kafka queue to a transcoder that writes 360p, 720p and 1080p versions to a CDN; and a watch path where the API returns a CDN link from cache or a read replica, and the client streams directly from the CDN.
Same feature, three designs. In the architect's version, your servers never send video bytes at all.

The most important change is easy to miss: the architect’s servers never send the video. The API returns a link, and a CDN (a network of servers close to users) delivers the video. Uploads go into a queue, and separate workers convert them in the background, so a slow conversion never blocks the user. Each part can fail, scale and change on its own.

And the architect writes it down. Not the code, but the decisions: what was chosen, why, what it costs, and what would make the team change its mind.

Here is the whole difference in one table:

Junior developer Senior engineer Architect
First question How do I code this? What’s the best technical solution? What are we solving, and what can go wrong?
Scope The feature The system The system and everything around it
Time horizon This sprint This quarter The next 2 to 3 years
Failure handling try / catch Retries and fallbacks Designs as if failure is certain
Success means It works It works well It works at scale and survives failure
Writes down Code comments Technical docs Decision records
“The developer asks how. The senior asks how well. The architect asks what if.”

So how do you start thinking that way? Four habits.

Habit 1: Think in decisions, not code

Code is cheap to change. Decisions are not.

You can rewrite a class over a weekend. Picking the wrong database can take a year to undo. Look at what each level of mistake costs to fix:

A bar chart of how long it takes to change a mistake. Switching a library or ORM: about a week, a short bar. Migrating data to a new schema: about a month, a medium bar. Undoing the wrong database choice: 6 to 12 months, with possible downtime, a long red bar.
The deeper the decision, the more it costs to undo.

That is why an architect slows down at exactly these moments. Take “which database for user accounts?”:

  • Junior developer: “PostgreSQL, because I know SQL.”
  • Senior engineer: “PostgreSQL, because it is reliable, keeps data consistent, and handles our load.”
  • Architect: “PostgreSQL. We need strong consistency for logins and we need joins with orders. The team knows it well. It gives us room up to about 50 million users. We are giving up easy horizontal scaling. When we get close to that limit, we split users across databases by user ID. We revisit this if we go multi-region.”

All three picked the same database. Only one of them knows when the choice stops being right, and what to do then.

Habit 2: Turn assumptions into guarantees

An assumption is something you hope is true. A guarantee is something your system makes true.

Here is a story that happens far too often. A shop’s checkout called a payment provider and assumed it would “always respond within 2 seconds.” On Black Friday, it took 30. The code had no timeout, so every request sat waiting and held on to a database connection. The connection pool ran out, and the whole checkout went down on the biggest sales day of the year.

The fix was not a cleverer algorithm. It was turning the hope into a rule:

// Java · PaymentService.java
try {
    // Guarantee: we never wait more than 5 seconds
    return circuitBreaker.call(() -> gateway.charge(request), Duration.ofSeconds(5));
} catch (TimeoutException e) {
    // Guarantee: a slow provider does not mean a lost sale
    retryQueue.add(request);
    return PaymentResult.pending("Payment is processing. We'll confirm shortly.");
}

A circuit breaker is a small guard that stops calling a service once it keeps failing, so one sick dependency cannot take everything else down with it.

Four rows. Each has an assumption card on the left, an arrow, and a guarantee card on the right. 'The payment API answers in 2 seconds' becomes 'Time out after 5 seconds, then queue and retry'. 'The email service is always up' becomes 'Save the user anyway and retry the email later'. 'Usernames will be unique' becomes 'A unique constraint in the database'. 'Nobody will abuse sign-up' becomes 'Rate limit: 5 sign-ups per IP per hour'.
Hope on the left, rules on the right. Every assumption you can't remove should become a guarantee.

Try this on your next design. List what you are assuming: the network is reliable, the database is always up, we’ll never have more than 10,000 users, users will use it the way we expect. Then ask of each one: if this turns out false, does the system break? If yes, add a timeout, a limit, a constraint, a retry, or a fallback.

Habit 3: Ask “best for what?”

Developers often ask, “What’s the best architecture for this?” Architects answer with another question: “Best for what? How many users, what budget, how big a team, how soon?”

Take a URL shortener, like bit.ly, in three different situations:

Three columns for the same URL shortener. Side project: you and 5 friends, 100 clicks a day, zero budget; one small app and SQLite on a free host, built in an afternoon. Startup: 10,000 users, 100,000 clicks a day, about 500 dollars a month; one Spring Boot app with PostgreSQL and a Redis cache in one region. Large product: 100 million users, a billion clicks a day, 99.99 percent uptime; a CDN in front of two regions, each with its own services, Kafka and sharded databases.
Same product, three right answers. Architecture is about fit, not fashion.

Each design is correct for its situation, and wrong for the other two. The big-company design would sink the side project in cost and complexity. The side-project design would collapse under a billion clicks.

This is why copying Netflix is a trap for a three-person startup. Netflix runs hundreds of services because it has thousands of engineers and Netflix-sized problems. You probably have neither. Your best design is likely a well-organised single application, in one region, on managed services, easy to change quickly.

The real skill is avoiding both traps:

  • Over-engineering: building for a scale you don’t have and may never reach. It costs speed, money and focus today.
  • Under-engineering: ignoring a scale you can clearly see coming. It costs a painful rewrite later.

Before choosing anything, write down the context: current and expected users, peak traffic, team size and skills, budget, deadline, and any rules you must follow (like healthcare or payment regulations). The context picks the architecture. Your favourite technology does not.

Habit 4: Name the trade-off, every time

There is no perfect architecture. There are only trade-offs. Every choice gives you something and takes something away.

Even something as small as “where do we keep user login sessions?” has no single right answer:

  • In the server’s memory: the fastest, but sessions vanish on restart and users get stuck to one server.
  • In Redis: fast, shared across servers and survives restarts, but it is one more thing to pay for and keep running.
  • In the database: the most durable, but slower, and it adds load on every request.
  • In a JWT (a signed token the browser keeps): no storage on your side at all, but you can’t easily log someone out instantly.

An architect doesn’t pick one because it is popular. They say out loud what they are getting, what they are paying, and when they would choose differently. A sentence like “We’ll use Redis. We accept a few milliseconds of latency and one more service to monitor, because we need sessions to survive restarts and be revocable” is worth more than any diagram.

What interviewers are really listening for

This is also exactly what a system design interview tests. Interviewers rarely care whether you name the “right” database. They care how you think.

What they want to hear:

  • Questions before answers: “How many users? Is this read-heavy?”
  • Trade-offs said out loud: “This gives us X, but costs us Y.”
  • Failure thinking: “If this service goes down, here’s what the user sees.”
  • Starting simple and growing the design as the numbers demand.

What worries them:

  • Jumping straight to “We’ll use microservices and Kafka” before asking anything.
  • Calling any technology “the best” without saying for what.
  • Designs where nothing ever fails.

The four questions to practise

If you remember one line from this article, make it this one: architecture is not about technology. It is about making good decisions when you can’t be sure what will happen.

You don’t need the title to start. On your very next task, before you write the first line of code, ask yourself these four questions:

  1. What could go wrong?
  2. What am I giving up?
  3. What am I assuming, and what if it’s wrong?
  4. When would this “best practice” stop being the best?

Ask them every time, and they slowly become how you think. That is all an architect really is: someone who asks these questions before production asks them instead.

Comments

LEAVE A COMMENT
No sign-up. Comments appear after a quick review.