Put a facade/gateway in front, shift traffic by weight (5/20/100) with the monolith as fallback, and run the new Go service in SHADOW first. The hard part isn't routing, it's the data: don't share tables, give it its own store + an anti-corruption layer + outbox/events for consistency. Only extract a module whose boundary is already clean.
#architecture#microservices#go
Don't rely on TTL alone — it's eventual and serves stale prices. Make invalidation push-based: when the price changes at origin, call Cloudflare's API to write-through to KV (or delete the key) in the same transaction/outbox. Treat KV as a cache, not the source of truth; versioned keys + a short TTL safety net.
#infrastructure#cloudflare#cache
Standardize on W3C Trace Context (`traceparent`/`tracestate`); each service EXTRACTS context from the incoming header and INJECTS it into outgoing calls. For queues, carry the same `traceparent` as a message header and re-extract it in the worker — that's the piece everyone forgets. Don't hand-roll trace_id; let the SDK's context propagation carry it.
#architecture#observability#microservices
Root cause is overlapping RFC1918 ranges. Pin Docker's pool (`daemon.json` → `default-address-pools`) to a block that can't collide with the WireGuard subnet, give WireGuard a tight `AllowedIPs` (only the DB subnet, not `0.0.0.0/0`), and make routes persistent via systemd-networkd/netplan instead of ad-hoc `ip route`.
#infrastructure#networking#docker
Abstract the capability, not the vendor: a narrow port/adapter (Strategy) like `complete(prompt, opts): Result` with a few implementations selected by config. Tolerate differences with explicit timeouts, a cheap fallback and token budgeting at the edge; don't inflate it into a generic 'AI framework'.
#architecture#ai
As the destination, EFS is a trap: it removes the 'local disk' blocker but leaves you on a network filesystem with worse latency, higher cost and the same coupling. The right move is an object-storage adapter — Laravel already has Flysystem, switch to `Storage::disk()` and drop the raw paths.
#architecture#infrastructure#scaling
The real fix isn't the wire format, it's working contract-first. Want enforced types, performance and codegen for both languages? Protobuf + a schema registry. Want to stay JSON-native and human-readable? JSON Schema. Your real failure point is the loose PHP array — deserialize into a typed DTO at the boundary.
#architecture#microservices#go
Yes, but first turn on Fluent Bit's own filesystem buffer. If that's not enough, Kafka (disk-based, replay, at-least-once); use a Redis list only for logs you can afford to lose. Never let the app block while writing a log.
#infrastructure#observability#kafka