Choosing an API style is no longer simple. Each has a niche. Protocol Best For Pros Cons REST Public APIs Universal cacheability Over/Under fetching gRPC Microservices Binary performance, Typed Browser support is poor (needs WebProxy) GraphQL Mobile/Frontends Single request, Flexible Complexity, Security (DoS via deep queries) The Hybrid Approach We use gRPC for internal service-to-service […]
Read more โMonth: July 2021
IdentityServer4 is Dead: Long Live OpenIddict
IdentityServer4 (IS4) changed its license. For many enterprises, this forced a migration. OpenIddict is the best free alternative. Why OpenIddict? OpenIddict is decoupled. It doesn’t enforce a specific UI or database schema. It integrates natively with ASP.NET Core Identity. We migrated a large IS4 implementation to OpenIddict. The key benefit was the flexibility to use […]
Read more โAzure Container Apps: KEDA and Dapr Managed
Kubernetes is hard. Azure Container Apps (ACA) gives you K8s + KEDA + Dapr without the control plane tax. Scale to Zero ACA can scale your HTTP service to 0 replicas when no requests are coming in. Even better, it uses KEDA scalers. This configuration automatically scales your container based on the depth of an […]
Read more โ.NET 6 Minimal APIs: Testing Strategies
Minimal APIs are great, but how do you test them without a `Startup` class? WebApplicationFactory You must expose the internal `Program` class to your test project. Now you can use `WebApplicationFactory<Program>` in xUnit to spin up the in-memory server.
Read more โAKS Network Policy: Locking Down Traffic
By default, K8s is flat. Any pod can talk to any pod. In a multi-tenant cluster, this is a security violation. Deny All Strategy We implement a “Zero Trust” network policy. Then we explicitly allow traffic:
Read more โC# 10: File-Scoped Namespaces
The era of indentation hell is over. C# 10 introduces File-Scoped Namespaces. This seems minor, but combined with Global Usings, it saves 5-10 lines of vertical space per file.
Read more โ