Looking for API Gateway Advice — Concerned About “Action-Based” Pricing

Optimizing API Gateway Strategies: Navigating Action-Based Pricing and Architectural Best Practices

In the evolving landscape of API architecture, choosing the right gateway solution is crucial—but pricing models can sometimes introduce unexpected concerns. Recently, I’ve been exploring various API gateway providers and encountered a common challenge: some vendors charge based on the number of “actions” or “endpoints” exposed through the gateway. This pricing approach raises important questions about architectural design and scalability.

Understanding the Current Setup

Our backend structure maintains a separation of concerns, with controllers such as WidgetsController handling actions like CreateWidget, GetWidgets, UpdateWidget, and DeleteWidget. Additionally, for clarity and domain specificity, we’ve defined separate actions tailored to particular use cases, such as GetWidgetsForUseCase1 and GetWidgetsForUseCase2. These specialized actions encapsulate distinct business logic aligned with specific workflows.

It’s worth noting that our design adheres to the DRY principle—shared logic resides at the service layer to avoid redundancy. The use-case-specific endpoints primarily serve clarity and maintainability, not to duplicate code.

Vendor Recommendations and Architectural Considerations

The API gateway provider has suggested reducing the number of endpoints by consolidating multiple actions into fewer, more versatile endpoints. This would involve using query parameters or flags to modify behavior internally—effectively turning several narrowly scoped actions into a single, multifaceted endpoint. They propose leveraging their tooling for managing this internal logic at the gateway layer.

While this consolidation might seem appealing from a management perspective, I’m wary of potential drawbacks. It feels more like a strategy to increase the number of billable actions rather than a true architectural enhancement. Moreover, this approach could lead to complex internal logic within endpoints, possibly impacting maintainability and clarity.

Future Development and Response Variability

Our plans include adding new actions and endpoints to accommodate evolving requirements, some of which may return markedly different responses depending on the request parameters. This scenario raises additional questions about endpoint scope and the balance between granular versus consolidated API design.

Key Question: Architectural Trade-offs

Does consolidating multiple narrowly defined actions into fewer, more complex endpoints offer tangible benefits in terms of performance, scalability, or maintainability? Or is it more advantageous to retain focused, clearly defined endpoints—even if that results in a higher count of API routes?

Seeking Insights and Experience

I’m eager to hear from seasoned API architects and developers—particularly those who’ve navigated similar pricing models or large


Leave a Reply

Your email address will not be published. Required fields are marked *