SOA vs Microservices: What Actually Differs, and How to Choose

8 minute read

“Microservices are just SOA done right.”

You’ll hear some version of this in almost every architecture discussion. It’s half true, and the half that isn’t true is where most teams get into trouble.

Both styles decompose a system into services that talk over a network. But they come from different eras, solve different problems, and put the complexity in different places. And the most common failure mode in practice isn’t picking the wrong one: it’s splitting a system into services without changing how data and ownership are divided, and ending up with a distributed monolith.

In this article, we’ll look at where each style came from, what actually differs between them, what a service boundary really costs, and how to decide when splitting a service is worth it.

SOA vs microservices architecture

1. Where each style came from

Service-Oriented Architecture (early 2000s)

SOA grew out of enterprise integration. Large organizations had dozens of systems (billing, CRM, inventory, HR) built by different vendors in different technologies, and they needed those systems to work together.

SOA’s answer was to expose each system’s capabilities as reusable services with formal contracts (WSDL), communicating over standard protocols (SOAP/XML), often coordinated through an Enterprise Service Bus (ESB). The ESB handled routing, message transformation, orchestration and protocol translation.

The primary goal was reuse and integration across the enterprise.

Microservices (early 2010s)

Microservices emerged from companies like Amazon and Netflix, which needed hundreds of teams to ship changes to a single product independently and many times a day.

Their answer was to split one application into small services, each owned by one team, deployed independently, and owning its own data. Communication happens through simple, lightweight mechanisms: HTTP/JSON, gRPC, or a message broker.

The primary goal was independent deployability and team autonomy.

That difference in motivation explains almost every other difference between them.

2. Side by side

  SOA Microservices
Primary goal Reuse and integration across the enterprise Independent delivery by autonomous teams
Scope Many applications across an organization Usually one product or domain
Service size Coarse-grained business capabilities Fine-grained, bounded by a domain context
Where logic lives Often in the middleware (ESB): “smart pipes” In the services: “smart endpoints, dumb pipes”
Data Shared databases are common; canonical enterprise data model Each service owns its data; no shared database
Contracts Formal, centrally governed (WSDL, XSD) Lightweight, owned by teams (OpenAPI, protobuf)
Governance Centralized standards and review Decentralized, with platform guardrails
Deployment Often coordinated releases Each service deploys on its own schedule

Two rows matter more than all the others: where the logic lives and who owns the data.

3. Smart pipes vs smart endpoints

In many SOA implementations, the ESB became the most important and most fragile part of the system. Business rules crept into routing and transformation logic. Changing a workflow meant changing the bus, which a central integration team owned, so every change queued behind that team.

Microservices deliberately move that logic out of the middleware and into the services. The broker or HTTP layer just moves bytes. If a workflow spans services, it’s coordinated either by an orchestrating service that a team owns, or through events that each service reacts to (choreography).

This isn’t free. Logic that used to sit in one place is now spread across services, which makes end-to-end behaviour harder to see. That’s why distributed tracing stopped being a luxury once teams adopted microservices.

4. Data ownership is the real boundary

Here’s the rule that separates real microservices from a distributed monolith:

A service’s data is private. Other services access it only through that service’s API or events.

If the orders and inventory services both read and write the same products table, they aren’t independent, whatever your deployment diagram says. A schema change in one breaks the other. They have to be released together. They are one service split across two codebases, with a network hop added for free.

Signs you have a distributed monolith:

  • Releasing one service routinely requires releasing others at the same time.
  • Services share database tables or schemas.
  • A single user request fans out into a long synchronous chain of calls, and one slow service stalls everything.
  • Teams need meetings with three other teams to ship a feature.

Owning data separately also means giving up something: you lose cross-service ACID transactions. Workflows that span services need sagas, the transactional outbox pattern or, rarely, distributed commit protocols, each with its own trade-offs.

5. The hidden cost: a function call becomes a network call

In a monolith, placing an order might look like this:

func (s *OrderService) PlaceOrder(ctx context.Context, o Order) error {
    if err := s.inventory.Reserve(ctx, o.Items); err != nil {
        return err
    }
    return s.payments.Charge(ctx, o.CustomerID, o.Total)
}

Charge either succeeds or fails, in microseconds, and if the process crashes, both calls disappear together.

Now move payments into its own service. The call site looks similar, but the client underneath has to handle a completely different set of failure modes:

type PaymentsClient struct {
    http    *http.Client
    baseURL string
}

func (c *PaymentsClient) Charge(ctx context.Context, req ChargeRequest) error {
    body, err := json.Marshal(req)
    if err != nil {
        return err
    }

    backoff := 100 * time.Millisecond
    for attempt := 1; ; attempt++ {
        err = c.tryCharge(ctx, body, req.IdempotencyKey)
        if err == nil || !isRetryable(err) || attempt == 3 {
            return err
        }

        // Exponential backoff with jitter, abandoned if the caller gives up.
        jitter := time.Duration(rand.Int63n(int64(backoff)))
        select {
        case <-time.After(backoff + jitter):
            backoff *= 2
        case <-ctx.Done():
            return ctx.Err()
        }
    }
}

func (c *PaymentsClient) tryCharge(ctx context.Context, body []byte, key string) error {
    ctx, cancel := context.WithTimeout(ctx, 500*time.Millisecond)
    defer cancel()

    httpReq, err := http.NewRequestWithContext(ctx, http.MethodPost,
        c.baseURL+"/charges", bytes.NewReader(body))
    if err != nil {
        return err
    }
    httpReq.Header.Set("Content-Type", "application/json")
    httpReq.Header.Set("Idempotency-Key", key)

    resp, err := c.http.Do(httpReq)
    if err != nil {
        return retryable(err) // Timeout or connection error: outcome unknown.
    }
    defer resp.Body.Close()

    switch {
    case resp.StatusCode < 300:
        return nil
    case resp.StatusCode == http.StatusTooManyRequests || resp.StatusCode >= 500:
        return retryable(fmt.Errorf("payments: status %d", resp.StatusCode))
    default:
        return fmt.Errorf("payments: status %d", resp.StatusCode)
    }
}

type retryableError struct{ err error }

func (e retryableError) Error() string { return e.err.Error() }
func (e retryableError) Unwrap() error { return e.err }

func retryable(err error) error { return retryableError{err} }

func isRetryable(err error) bool {
    var r retryableError
    return errors.As(err, &r)
}

Every line here exists because of the network:

  • Timeouts, because the payments service might hang.
  • Retries with backoff and jitter, because failures are often transient, and synchronized retries can turn a blip into an outage.
  • An idempotency key, because the most dangerous outcome is a timeout after the charge succeeded. Without the key, a retry charges the customer twice.
  • Classifying errors, because retrying a 400 Bad Request is pointless, and retrying an overloaded service with no limit makes things worse.

And this client still doesn’t solve the hardest part: if Reserve succeeded and Charge permanently fails, someone has to release the inventory. That’s now a distributed workflow, not an if err != nil.

None of this is a reason to avoid services. It is a reason to make sure each boundary pays for itself.

6. Conway’s law

“Organizations which design systems are constrained to produce designs which are copies of the communication structures of these organizations.” (Melvin Conway, 1967)

Microservices work best when service boundaries match team boundaries. A team that owns a service end to end (code, data, on-call, roadmap) can move quickly. A service that three teams all modify gives you the coordination costs of a monolith plus the failure modes of a distributed system.

So “how should we split this system?” is partly an organizational question. If you have one team of eight engineers, twenty microservices is almost certainly the wrong answer.

7. A framework for deciding when to split

For most new products, the best starting point is a modular monolith: one deployable unit, but with strong internal module boundaries, each module owning its own tables and exposing a clear interface.

Then extract a module into its own service only when you can point to a concrete reason:

Reason to extract Example
Independent scaling Image processing needs 50× the CPU of the rest of the app.
Different release cadence The pricing engine changes daily; billing changes quarterly under audit.
Fault isolation A crash in recommendations must never take down checkout.
Team ownership A dedicated team now owns search and is blocked by shared releases.
Different technical needs An ML inference component needs Python and GPUs.
Compliance boundary Card data must be isolated to limit PCI scope.

And be wary when the main reason is “it will be cleaner” or “that’s what modern systems do”.

Before splitting, also ask:

  • Can this module’s data be fully separated, or will the new service need someone else’s tables?
  • What happens to the user experience when this service is slow or down?
  • Who will be on call for it?

If those answers are unclear, the boundary probably isn’t ready.

8. What this means in practice

  • SOA isn’t obsolete. Integrating many existing systems across a large organization is still a real problem, and a well-governed integration layer is still a valid answer. Just keep business logic out of the middleware.
  • Microservices are an organizational scaling tool first and a technical scaling tool second.
  • Data ownership defines the boundary. If two services share a database, treat them as one.
  • Every network boundary needs timeouts, retries, idempotency and observability. Budget for that work before you split.
  • Start with modules, extract with evidence. Splitting a well-modularized monolith is much easier than merging a tangle of services back together.

Conclusion

SOA and microservices share a vocabulary but not a purpose. SOA set out to integrate an enterprise’s systems through shared services and central governance. Microservices set out to let independent teams ship independently, which requires each service to own its logic and its data.

The labels matter less than the boundaries. A good service boundary follows a domain, matches a team and owns its data. A bad one adds a network hop, a deployment dependency and a new set of failure modes, and gets nothing in return.

What’s next?

Once a service has a real boundary, it can grow on its own. But how should it grow: bigger machines or more of them? We’ll look at that trade-off next in:

Vertical vs Horizontal Scaling: Choosing Where the Next 10x Comes From


Further reading:

Comments