In-house or external service? The dependency is still yours

You don't own the service, but your system depends on it. Explore the similarities and differences between in-house and external services and what they mean for your architecture.

In-house or external service? The dependency is still yours

When designing a system and exploring what can be reused or bought, you may find yourself in a situation where you decide to use either an external service or an in-house service that already exists within your company.

Today, we'll look at the similarities and differences between these two options from an architectural perspective. We'll focus on the characteristics worth considering as input when designing your architecture.

The intention of this article is not to answer the question of whether you should use an in-house or external system when both fulfil your requirements. Instead, it presents a list of aspects you should consider whenever either option is on the table.

Treat the Same

An existing system means that many decisions have already been made, and you need to accept them. These systems may have their own plans and a brighter or darker future ahead of them. It doesn't matter whether the system is external or in-house. What matters is that it isn't part of the system you're building.

You don't own it

The system isn't yours, so you cannot simply come up with a new feature or a small adjustment, add it to the backlog, assign someone to work on it, and wait for successful delivery.

Of course, depending on the contract or your relationship with the service provider, you may have some influence over what gets delivered. However, you still need to consider the cost. Sometimes that cost comes in the form of money, sometimes in the time spent negotiating, and sometimes in the effort required for coordination.

Additionally, you need to account for situations where your request won't be fulfilled within your desired timeframe. After all, your backlog and priorities aren't their backlog and priorities.

You have to work with what's given

If the service uses a REST API, that's how you have to integrate with it. If you prefer asynchronous communication but synchronous communication is what the service offers, that's another challenge you need to address. If the service provides a contract (definitions of requests and responses) that you find unintuitive, you've just found another problem to tackle.

Their security becomes yours

To be honest, this could be part of the previous section, but I always prefer to treat security separately.

When connecting to another service, you need to accept its authentication and authorization mechanisms (tokens, passwords, etc.). But that's only the beginning.

When you don't own the system, you don't know what happens under the hood. How secure is the system you're communicating with? Depending on the type of relationship and contract, you may receive more or less information. Still, your security standards may be considerably higher than theirs.

It will evolve without your permission

You should expect the system you integrate with to change over time. It doesn't matter whether you're currently their first privileged user or one of thousands. At some point, the API may change, and you'll have to react. It won't necessarily be work you'd choose to do, but it will be work you'll have to prioritize to keep existing functionality running.

The service provider may introduce new functionality or modify existing features in a way that seems beneficial to you, but not necessarily in the form you'd like to use. It's then up to you to adapt the API to your scenarios and requirements.

It won't always be available

Of course, services and components within your own system may also become unavailable. However, as long as they remain within your system's boundaries, you have considerably more options for bringing them back. You can invest heavily in prevention and automation, but even in the worst-case scenario, when something unexpected happens and human intervention is required, you still have control over how the recovery process works.

When dealing with a service outside the system you're building, your options for restoring its availability are limited. That's why you need to plan what to do when it becomes unavailable.How will you return to normal operation once the problem is resolved? What should happen if the issue lasts minutes? Hours? Days?

Of course, the approach depends on how critical the service is to your system. However, these are questions worth asking before making the decision.

It may go away

This isn't a scenario many people think about, but it's one that can happen regardless of whether the system is external or in-house. The system you're depending on may not live as long as yours. The younger the system, the greater the chance that it will disappear. Not necessarily because of a bad idea or a poor solution. Its owners may simply fail to generate enough revenue (in any form) to justify keeping it alive.

An important aspect here, just as in the previous section, is how critical the service is to your system. This factor alone may have a significant impact on your decision.

Treat Differently

There are many similarities between in-house and external services from the perspective of the architecture you're building. However, there are also some differences you shouldn't ignore.

Solution, standards and practices

Yes, you cannot control the processes, quality, or standards of a system you don't own. You can ask for certain things and try to persuade its owners, but ultimately, the quality standards, approaches, and technologies used are up to them.

With an in-house solution, however, you can generally have greater confidence that these aspects will be closer to your own standards. If your company cares about quality and promotes specific approaches and techniques, there's a good chance that most teams around you follow those recommendations. When considering this aspect, it's worth taking the size of the company into account. The bigger the organization, and the further away the team responsible for the system is in the organizational structure, the more differences you may encounter in standards and practices.

After all, some companies are so large that their divisions operate almost like separate companies within the same organization.

Buying yourself time through coordination

You know that something will change, and it won't always happen at a time when you have room to accommodate that change (assuming such a time even exists). However, that doesn't mean you cannot negotiate.

With an external service, you may be able to do so through the contract, dedicated support, or an extended paid support period.

With an in-house solution, you can try to emphasize shared high-level goals and use them as a basis for reaching an agreement about delaying a problematic release. If your system is important from the company's perspective, you can also escalate the matter to ensure that their releases are aligned with yours. This may give you more time to deliver the required changes.

Pilot phase

If you're the first user or customer, or one of the first, you may benefit from the investment being made in the service.

During this initial period, an in-house and an external service may not differ much. If you're the only client, your demands and requests may effectively become their backlog. However, this changes over time, and the extent of the difference depends heavily on the scenario.

If the system becomes successful and attracts more users, things may change. With an external service, you may become one of many customers. With an in-house solution, you may become part of its success story, serving as an example of its adoption and potentially providing support to other teams.

If the initiative fails, the external service provider lives you with the problem. In the in-house scenario, the service may become yours, especially if you're the only user and still depend on the service.

You can become an owner

In one of the previous sections, I mentioned that both in-house and external services can disappear. There are plenty of reasons for this: lack of budget, too few users, no success story, insufficient return on investment, stronger competitors, and so on.

However, when an in-house service is being discontinued and you're still using it, you may have an opportunity to take ownership of it. Of course, this isn't only about the benefits. You gain control over the API and can change or modify it whenever and however you like. But ownership comes with costs as well: you inherit existing technical decisions, technical debt, and all the other consequences of choices made by the previous team.

Still, sometimes taking over an in-house service and making it part of your system is cheaper than looking for a replacement.

I know the same situation can occur with an external service that's reaching the end of its life. However, in my opinion, taking ownership is considerably more difficult when the system is provided externally than when it's already part of your organization.

Summary

The similarities and differences discussed here shouldn't be treated as universal rules set in stone. After all, some aspects may look different in your particular situation. Think of this list as a starting point and a reminder of the things worth considering when deciding whether to rely on an existing in-house or external service.

The important thing is to understand that neither option comes without trade-offs. Both introduce dependencies, constraints, and responsibilities that should be part of your architectural decisions.

Reusing an existing service doesn't mean you can forget about it. You're introducing a dependency into your system, and with that dependency come responsibilities, constraints, and risks. The fact that someone else is responsible for developing and maintaining the service doesn't make its consequences any less yours.