Skip to content
Muhammet Şafak
tr

Just Ask

Ask me anything

Ask me anything about software architecture, careers, PHP, Go and the craft of building software; I answer here, in the open, for everyone. (Page 6/6)

Ask a question

Whatever's on your mind, don't hold back. Questions reach me directly; I answer the good ones and publish them on this page. Your email is never published.

Your email only reaches me and is never published.

Onur

How do I peel the payment module off a PHP monolith with Strangler Fig?

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
Tolga

If I build edge caching with Cloudflare Workers + KV, how do I do invalidation?

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
Ece

How do I set up distributed tracing (OpenTelemetry) across microservices?

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
Mert

WireGuard collides with Docker networks — how do I stabilize routing?

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
Deniz

How should I abstract the LLM provider (Ollama → Bedrock/OpenAI)?

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
Kaan

When moving local files to S3, is EFS a good interim step?

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
Selin

For the message schema between Laravel and Go services, Protobuf or JSON Schema?

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

Search the site

Start typing to search posts, projects and pages.

Esc to close Powered by Pagefind