cross-cutting concern
A need that applies across many services or endpoints, such as authentication, rate limiting, logging or TLS, rather than to one feature.
In more detail
Handling such concerns once, at a shared boundary, avoids duplicated rules that drift apart; resource-specific decisions stay with the service that owns the resource. Gateways, middleware and shared libraries are common places to implement them.
Related terms
- API gateway — A server that sits in front of one or more services and handles shared concerns such as routing, authentication, rate limits and TLS for every request.
- middleware — Code that sits between an incoming request and the handler that answers it, doing a shared job such as logging, authentication or rate limiting.
- endpoint filter — Code that wraps selected minimal API handlers to run checks, such as validation or timing, before or after the handler.
- decorator — A line starting with @ placed above a function or class that wraps it to add behaviour or information.
- wrapper function — A function that calls another function, adding behaviour before or after it, such as timing, retries or logging.
Taught in
- API Gateways And Proxies — Modern API Architecture: REST, GraphQL & gRPC
- The ASP.NET Core Middleware Pipeline — Modern .NET Core, C# & Enterprise Microservices
- Building Routes with Minimal APIs — Modern .NET Core, C# & Enterprise Microservices
- Modern Decorators: Stage 3 Standards And Class Metadata — Production TypeScript