The Hidden Force Slowing Your Deploys
Uncover the silent dependency trap that keeps your applications from reaching production effortlessly
Do you feel that testing your application is difficult?
For running your tests, you have:
A Docker Compose file
Which has the 2 different services that your application talks to
Plus the corresponding infrastructure that those 2 services require (database, etc)
Plus Kafka, because your service produces/consumes in Kafka.
And sometimes the Docker Compose fails; some service did not start because of some random problem, and you have to restart.
๐๐ผ This has a problem: It slows you down for reaching production for every single change you implement.
In todayโs email, youโll learn one key step that will help you deliver your applications to production more quickly.
๐ฏ The Problem
Dependencies. Thatโs the underlying problem.
In this context:
A dependency is any other service, application, or system that your application interacts too.
๐๐ผ Testing your application is costly because your service has too many dependencies.
Iโll share with you 6 problems caused by having multiple dependencies.
Coupling and coordinating changes: If your service depends on many others, any change to an API/contract can force coordinated changes across multiple teams or your deployment. The result: blocked deployments, delays, and coordination meetings.
Unpredictable latency and performance. Chained calls to external services increase latency and variability (p99 spikes). This impacts user experience and SLOs.
Testing complexity: This was my main point at the beginning of the email. Unit tests are more representative; integration tests become more expensive and slower. This makes it difficult to ensure quality in CI.
Operations and observability become more difficult. You need metrics/traces/alerts for each dependency. Identifying the root cause of a problem becomes more complicated.
Versioning and compatibility: If you depend on APIs without stable contracts or without semver, managing versions becomes a pain (breaking changes, coordinated migrations).
Loss of team autonomy. Small teams lose the ability to iterate quickly if they must coordinate with many external stakeholders.
So, the fewer dependencies your application has, the faster it can be deployed in Production.
๐งโโ๏ธ The Solution
Reduce dependencies to one, or the most as you can. Thatโs my recommendation.
I know it sounds tough, but in my experience, itโs the essential step if you want your application to reach production as quickly as possible.
But, Marcos, the business logic of my application needs all those dependencies, how can I reduce my dependencies then?
Decoupling. Decoupling your application from your dependencies. Take advantage of refactoring time to do this.
I wrote a dedicated email explaining how to decouple a monolith here, but I can give a couple of concrete hints now.
1. Implement asynchronous communication with your dependencies.
Example:
Instead of calling 2 REST APIs and communicating with Kafka.
Use only Kafka (or another one) for communicating with those 2 APIs.
Coming back to the problem of testing your application, now you donโt need to spin up 2 different services (with the linked infra) plus Kafka; You just need Kafka for your tests.
2. Consume one single dependency and extract logic to new applications/services.
Example:
Your application reads from AWS S3, applies some business logic, and produces to Kafka.
Create a new Platform Service, configurable, that is in charge of only reading from AWS S3 and producing into Kafka.
Then, update your application to read from Kafka (where the other service puts the data), apply the business logic, and produce to Kafka.
With just those two strategies, youโll turn a โhard-to-shipโ application into an independent one that can be deployed to production multiple times a day.
โจ Takeaway
I want you to retain this from todayโs email:
๐๐ผ Reduce the number of dependencies in your applications. As much as you can.
Thatโs THE takeaway today. Only that.
If you need more strategies for achieving this, reply to this email, comment if you are in Substack, or ping me in Bluesky or Mastodon. Happy to help!
We are more than โจ1080 Optimist Engineersโจ!! ๐
Thanks for your support and feedback, really appreciate it!
Youโre the best! ๐๐ผ
๐๐ง ๐บ๐ฐ๐ถ ๐ฆ๐ฏ๐ซ๐ฐ๐บ๐ฆ๐ฅ ๐ต๐ฉ๐ช๐ด ๐ฑ๐ฐ๐ด๐ต, ๐ต๐ฉ๐ฆ๐ฏ ๐ค๐ญ๐ช๐ค๐ฌ ๐ต๐ฉ๐ฆ ๐. ๐๐ต ๐ฉ๐ฆ๐ญ๐ฑ๐ด!
๐๐ง ๐บ๐ฐ๐ถ ๐ฌ๐ฏ๐ฐ๐ธ ๐ด๐ฐ๐ฎ๐ฆ๐ฐ๐ฏ๐ฆ ๐ฆ๐ญ๐ด๐ฆ ๐ธ๐ช๐ญ๐ญ ๐ฃ๐ฆ๐ฏ๐ฆ๐ง๐ช๐ต ๐ง๐ณ๐ฐ๐ฎ ๐ต๐ฉ๐ช๐ด, โป๏ธ ๐ด๐ฉ๐ข๐ณ๐ฆ ๐ต๐ฉ๐ช๐ด

