Dosi Bridge

Dosi Bridge Digital Operations & Software Innovation – Business Research Infrastructure for Development, Growth & Engineering

C # records vs classes is a common interview question, but the production risk is real: using value equality for mutable...
05/08/2026

C # records vs classes is a common interview question, but the production risk is real: using value equality for mutable domain objects can make sets, caches, and tests behave in surprising ways.

Simple rule: records are excellent for small immutable values, DTOs, and messages. Classes are often clearer for entities that have identity and change over time.

A common mistake is answering only the syntax difference: records give value equality and nice copying. That is true, but it is not a design rule for every model.

In real projects, ask what defines sameness. If two users have the same Id but different current data, entity identity usually matters more than comparing every property.

Where do you prefer records, and where do you still use classes?

Polly .NET resilience is useful, but retries without timeout, backoff, and idempotency can turn one flaky dependency int...
04/08/2026

Polly .NET resilience is useful, but retries without timeout, backoff, and idempotency can turn one flaky dependency into a bigger production outage for your API, clients, and cloud costs.

I like studying open-source libraries because they show the boundaries behind a simple pattern.

Retry is not a magic reliability button. It is a tool for short transient failures. If every request retries at the same time, your API can multiply load, duplicate writes, and hide the real bottleneck.

A better production habit:
- Set a clear timeout per outbound call
- Retry only safe or idempotent operations
- Add jittered backoff instead of instant loops
- Use a circuit breaker when a dependency is failing
- Log attempt count and failure reason

For beginners: a retry answers “should I try again?” A resilience pipeline also asks “how long, how often, and when should I stop?”

Send this to a teammate who is adding HttpClient retries or calling external APIs from a backend service.

Which retry rule do you enforce before shipping APIs?

ASP.NET Core CORS is often treated like security, but it only controls which browsers may read responses. If your API tr...
03/08/2026

ASP.NET Core CORS is often treated like security, but it only controls which browsers may read responses. If your API trusts CORS instead of authorization, private data can still leak.

I see this confusion a lot with APIs used by web apps, mobile apps, dashboards, and partner integrations.

CORS is useful. It tells browsers which frontends may read a response. But it does not prove who the user is, whether the caller owns a resource, or whether another non-browser client can call your API.

A better production habit:
- Keep CORS narrow for browser clients
- Require authentication for private endpoints
- Check authorization at the resource boundary
- Return safe errors when access is denied
- Log origin and user context without logging secrets

For beginners: think of CORS as a browser door rule. Authorization is the actual permission check inside the building.

Send this to a teammate who is building APIs that will be called from multiple frontends or third-party tools.

Which API security misunderstanding do you still see in code reviews?

C # Dictionary thread safety is a small interview topic, but it becomes painful in production when many requests update ...
03/08/2026

C # Dictionary thread safety is a small interview topic, but it becomes painful in production when many requests update the same cache and the bug appears only under real traffic pressure.

Simple rule: Dictionary is fine for local or single-threaded use. It is not safe for concurrent writes from many requests or background jobs.

A common mistake is putting a normal Dictionary in a singleton service and treating it like a shared cache. It may pass tests, then fail under load.

In real projects, use ConcurrentDictionary, a proper cache like IMemoryCache, or keep the data scoped so only one flow owns the mutation.

Which shared-state bug has been hardest for you to reproduce?

ASP.NET Core background jobs matter when a request starts doing slow work. If invoices, emails, or imports run inside th...
02/08/2026

ASP.NET Core background jobs matter when a request starts doing slow work. If invoices, emails, or imports run inside the API path, users wait and failures become harder to recover from.

I like studying Hangfire because it shows a simple production boundary many teams learn late: the API should accept work quickly, then a worker should finish slow work safely.

The common mistake is doing everything inside the controller. It feels simple at first, but it mixes user latency, retry behavior, database transactions, email providers, and imports into one fragile request.

A better pattern:
- Validate the request and store intent
- Enqueue a small job with a stable id
- Make the job idempotent before retrying
- Track status so users can refresh or receive updates
- Keep dashboards and alerts for failed jobs

GitHub snapshot checked today: HangfireIO/Hangfire has 10k+ stars, 1.7k+ forks, and was pushed recently. I would study it as an architecture example, not just as a NuGet package.

Send this to a teammate who is building APIs that trigger emails, reports, imports, payments, or AI processing.

What work do you refuse to run inside a live API request?

OpenTelemetry .NET helps when APIs fail in ways logs cannot explain. If traces, metrics, and structured logs are missing...
01/08/2026

OpenTelemetry .NET helps when APIs fail in ways logs cannot explain. If traces, metrics, and structured logs are missing, every slow request becomes guessing instead of engineering.

I like studying OpenTelemetry because it teaches a production habit many teams postpone: design how you will debug the system before the incident happens.

The common mistake is adding random log lines after something breaks. Logs help, but they are not enough when one request crosses an API, worker, database, queue, and third-party dependency.

A better pattern:
- Trace one request across service boundaries
- Measure latency, errors, and saturation as metrics
- Keep logs structured and connected with trace IDs
- Send signals through a collector instead of locking every app to one vendor

GitHub snapshot checked today: open-telemetry/opentelemetry-dotnet has 3.7k+ stars, 890+ forks, and was pushed recently. The collector repo also has 7.3k+ stars, so this ecosystem is active and useful to study.

Send this to a teammate who is building APIs, workers, or AI workflows that must be debugged after deployment.

What signal helps you debug production APIs fastest: traces, metrics, or logs?

C # LINQ deferred ex*****on is easy to explain in interviews, but it also causes real production bugs when a query is en...
01/08/2026

C # LINQ deferred ex*****on is easy to explain in interviews, but it also causes real production bugs when a query is enumerated twice against a database, API, or expensive in-memory source.

Simple rule: IEnumerable is lazy. The Where line describes work; it does not always do the work immediately.

A common mistake is checking Any and then running Sum, Count, or ToList later on the same query. With EF Core, that can mean extra SQL. With an API-backed sequence, it can mean repeated remote calls.

In real projects, choose the boundary intentionally: keep composing while the database should work, then materialize once when the app needs stable data.

Which LINQ mistake do you see most often in code reviews?

The .NET Aspire service defaults matter because local development often hides deployment bugs. If service names, health ...
31/07/2026

The .NET Aspire service defaults matter because local development often hides deployment bugs. If service names, health checks, telemetry, and config are messy on day one, production makes them louder.

I like Aspire as an architecture lesson, not only a local tooling story. It reminds teams to design the boring edges before the app grows.

The common mistake is treating local development as a pile of ports, environment variables, and manual startup steps. That works until one service moves, one health check lies, or one trace is missing during a release.

A better pattern:
- Give services stable names instead of hard-coded localhost URLs
- Add health endpoints early, not after an incident
- Send traces and metrics from the start
- Keep connection strings and config outside code

GitHub snapshot checked today: dotnet/aspire has 6.2k+ stars and was pushed recently, so it is an active repo worth studying for .NET architecture habits.

Send this to a teammate who is wiring APIs, workers, or internal tools.

What local development practice saved you from a production deployment bug?

C # CancellationToken is a common interview topic, but the real production lesson is simple: cancellation only works whe...
31/07/2026

C # CancellationToken is a common interview topic, but the real production lesson is simple: cancellation only works when your code passes the token through the async call chain carefully.

I see beginners explain it like a stop button. It is not. It is a request to stop, and your code has to cooperate.

A common mistake is accepting a token in the controller, then forgetting to pass it into HttpClient, EF Core, queue handlers, or long-running loops.

In real projects, that means users close a request, but the server may still keep doing unnecessary work. That can waste threads, database time, and cloud cost.

My simple rule: if a method receives a CancellationToken, pass it to every async operation that supports it. If you run a loop, check it between meaningful steps.

Which async calls in your codebase still ignore CancellationToken?

YARP reverse proxy lessons matter when APIs start growing. Hand-rolled gateway code can hide bugs in headers, timeouts, ...
30/07/2026

YARP reverse proxy lessons matter when APIs start growing. Hand-rolled gateway code can hide bugs in headers, timeouts, auth, and routing, while a proven proxy makes the boundary easier to trust.

I like studying active open-source repos because they show production tradeoffs better than many tutorials.

One useful example for .NET developers is microsoft/reverse-proxy, also known as YARP. It is not just a repo link. It is a lesson in where gateway logic should live.

A simple way to read the carousel:
- Bad: forward requests with custom glue code
- Better: model routes, clusters, transforms, health, and observability as gateway concerns
- Review the boundary before adding another service-to-service shortcut

GitHub snapshot checked today: microsoft/reverse-proxy has 9k+ stars and was pushed recently, so it is an active repo worth learning from.

Send this to a teammate who is building APIs or internal tools.

What open-source .NET repo taught you the most about backend architecture?

Address

Dhaka
1207

Alerts

Be the first to know and let us send you an email when Dosi Bridge posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Shortcuts

Share