Benjamin Cane
Portrait of Benjamin Cane
Benjamin Cane
August 22, 2025

Sometimes when I tell people that logging can impact a microservices response time, I get strange looks. 🤨

But I get it. Logging doesn’t feel significant enough to create issues, yet I’ve seen it repeatedly make a considerable difference.

Recently, the team was benchmarking a new microservice that performed well until the request volume passed a few thousand transactions per second.

Once the request volume increased, the p99 latency skyrocketed.

The fix? Two major actions.

1️⃣ Changed a log message in the hot path of every request from Info (logged always) to Debug (only logged when enabled).

2️⃣ Enabling Asynchronous logging puts log messages into a buffer where they can be written to stdout in a different goroutine instead of blocking requests.

These two changes improved the p99 latency by nearly 200%.

This post isn't about not logging.

It's about being intentional:

  • Are you logging in the hot path for every request?

  • Is the log level correct?

  • Do you need every request logged at this point in the process?

Because logging does matter.

Back to the feed

Next Post

  • September 5, 2025 A core capability for building low-latency platforms is quickly detecting and reacting to issues.

Previous Posts

  • August 15, 2025 How many times have you seen analytics on an operational database create issues? I’ve seen it far too often.
  • August 8, 2025 I can't count how often I've seen issues made worse by minor oversights—like not setting a timeout value. ⏱️

Made with Eleventy and a dash of #Bengineering energy.