Feedback Loops: From Markets to Microservices
TL;DR
Markets are constant feedback loops. In designing trading systems, microservices are key to handling and adapting those feedback loops.
Context
Modern markets behave like living systems. They constantly sense, react, and reshape themselves. Prices shift, volumes surge, volatility compresses and expands. Every participant’s action becomes new data, which affects the next set of actions.
In essence, markets are built on feedback loops.
If we design trading systems without respecting that reality, we end up with brittle architectures that break the moment the environment deviates from the “expected case.” If we mirror the market’s structure, we build systems that can evolve with it.
This is where microservices shine. They let us engineer the same feedback-rich behavior that markets exhibit by nature.
Markets: The Ultimate Feedback Environment
A market is not just a dataset. It’s a conversation between buyers, sellers, and the rules that bind them.
Every decision feeds back:
- A large order moves prices.
- Price changes alter risk levels.
- Risk adjustments shift position limits.
- Position changes produce new market behavior.
The loop never ends.
The critical insight is simple:
Markets do not tolerate open-loop systems. They reward architectures that can sense → evaluate → adapt.
Microservices: Internal Feedback Mechanisms
A microservice ecosystem behaves like a miniature internal market. Each service:
- receives signals (events, prices, configs)
- processes them
- emits signals for others to react to
This creates a network of feedback loops, not a one-direction pipeline.
Some loops are tight and low-latency. Some are slow and structural. Together, they define how resilient the system is.
With those in mind, let us take a look at the loops in play in trading systems.
Tight Loops (milliseconds to seconds)
- Market data → pricing
- Pricing → risk
- Risk → position checks
- Position checks → execution logic
These loops must be predictable and fail-safe.
Medium Loops (seconds to minutes)
- Workflow retries
- Circuit breaker evaluations
- Autoscaling triggers
- Cache invalidation and refresh
These loops keep the system stable under pressure.
Long Loops (hours to weeks)
- End-of-day reconciliations
- Monitoring insights
- Human feedback
- Market-structure or regulatory changes
- Architecture adjustments
Closing Thought
Markets are not static. They are recursive, adaptive, and feedback-driven.
To operate in that world, microservice architectures must adopt the same characteristics. They must listen, interpret, and adjust constantly.
If you design your architecture as static pipelines, the market will break them. If you design it as a network of feedback loops, your system will become adaptable to the market.
Interested in how these are put together into a complete trading system? Check out my book Designing Trading Systems.