AWS wellarchitected: Rewrite ADVCOST03-BP03 to network-layer bid request filtering
Summary
Replaces the 'co-locate bidder and database nodes' cost best practice with guidance to filter predictably non-viable inbound OpenRTB bid requests at the network layer using RTB Fabric's OpenRTB Filter and Rate Limiter modules, including holdbackPercentage A/B validation, gradual rollout, weekly rule recalibration, and monitoring per-partner rejection rates in CloudWatch. Removes NLB/key-services section and updates related best-practice links.
Security assessment
This is primarily a cost-optimization best-practice rewrite (no-bid filtering to cut compute cost). The only security-relevant content is secondary: rate limiting is described as protecting downstream systems from traffic spikes ('leaves downstream systems vulnerable to traffic spikes that bypass filter rules'), a mild availability/DoS-hardening note. There is no reference to a specific vulnerability, CVE, credential, encryption, IAM, or exposure issue, so it is security-tangential documentation rather than a fix.
Evidence
* Rate limiting helps protect downstream systems from traffic spikes that bypass attribute-based filters.
Diff
diff --git a/wellarchitected/latest/video-streaming-advertising-lens/advcost03-bp03.md b/wellarchitected/latest/video-streaming-advertising-lens/advcost03-bp03.md index c856946..e34904e 100644 --- a//wellarchitected/latest/video-streaming-advertising-lens/advcost03-bp03.md +++ b//wellarchitected/latest/video-streaming-advertising-lens/advcost03-bp03.md @@ -7 +7 @@ -Implementation guidanceKey AWS servicesResources +Implementation guidanceResources @@ -9 +9 @@ Implementation guidanceKey AWS servicesResources -# ADVCOST03-BP03 Co-locate bidder and database nodes +# ADVCOST03-BP03 Filter inbound bid requests at the network layer to reduce compute costs @@ -11 +11,50 @@ Implementation guidanceKey AWS servicesResources -Keeping bidder and database nodes together can help transactions occur quickly and can also reduce inter-AZ and inter-Region traffic charges. +Most DSP bidders respond with no-bid to 70% or more of incoming requests. Each no-bid still consumes compute. The request traverses the network, gets deserialized, gets evaluated against targeting logic, and produces a response with zero revenue. If you filter predictably non-viable requests at the network layer before they reach application compute, you avoid that cost entirely. The built-in OpenRTB Filter and Rate Limiter modules in RTB Fabric run this filtering at no additional charge. + +**Desired outcome:** + + * Invalid, malformed, or predictably non-matching bid requests are rejected at the network layer, so that only commercially viable traffic reaches application compute. + + * Filter rules based on OpenRTB fields (geography, device type, floor price, ad format) are validated through holdback testing before full deployment. + + * Rate limiting helps protect downstream systems from traffic spikes that bypass attribute-based filters. + + * Per-partner rejection rates are monitored and partners with high rejection rates are engaged to improve bid request quality. + + * Filter rules are recalibrated weekly based on no-bid analysis to maintain accuracy as campaigns and traffic patterns shift. + + + + +**Common anti-patterns:** + + * Accepting all inbound bid requests into the application stack before evaluating validity, so full compute costs land on the 70%+ of requests that produce no-bid responses based on predictable attributes. + + * Implementing filtering logic only at the application layer rather than at the network layer, which still incurs deserialization and evaluation costs on requests that should never reach the bidder. + + * Deploying filter rules without holdback testing (holdbackPercentage), so accidental filtering of commercially viable requests goes undetected and revenue loss cannot be traced. + + * Deploying only attribute-based filters without rate limiting, which leaves downstream systems vulnerable to traffic spikes that bypass filter rules. + + * Treating filter rules as static configuration rather than a living system, so accuracy drifts as campaigns start, end, and shift targeting. + + * Never iterating on filter rules based on no-bid analysis. + + + + +**Benefits of establishing this best practice:** + + * Reduced compute costs proportional to filtered traffic volume (30-70% of inbound requests removed). + + * OpenRTB Filter and Rate Limiter are included with RTB Fabric. + + * Inline network-layer execution adds negligible latency compared to application-level filtering. + + * Rate limiting helps protect bidder availability during traffic spikes regardless of filter configuration. + + * Partner engagement on rejection rates improves traffic quality at the source. + + + + +**Level of risk exposed if this best practice is not established:** High @@ -15 +64 @@ Keeping bidder and database nodes together can help transactions occur quickly a -To optimize costs when configuring advertising bidder nodes to communicate with database nodes within the same Availability Zone, consider the following guidance: +Every bid request that reaches application compute costs money whether your bidder responds with a bid or a no-bid. In high-volume RTB environments processing millions of requests per second, even a small percentage of non-viable requests wastes a large amount of compute. Typical DSP no-bid rates range from 70% to 95%. When you can predict from attributes visible in the OpenRTB request envelope (geography, device type, COPPA flag, domain, and floor price) that a request will produce a no-bid, filtering it at the network layer turns a per-request compute cost into a near-zero marginal cost. @@ -17 +66 @@ To optimize costs when configuring advertising bidder nodes to communicate with - 1. **Resource placement:** Carefully plan the placement of your bidder nodes and database nodes across Availability Zones. Co-locate bidder nodes and their corresponding database nodes within the same Availability Zone to minimize cross-AZ data transfer costs. +Use both attribute filters and rate limiting for complete protection. Attribute-based filtering (the OpenRTB Filter module) drops or tags requests that match specific field values you define. Rate limiting (the Rate Limiter module) caps total transactions per second flowing through a link regardless of attributes, which helps protect your compute from volume spikes that exceed your bidder's healthy throughput. @@ -19 +68 @@ To optimize costs when configuring advertising bidder nodes to communicate with - 2. **Database configuration:** If using a managed database service like Amazon RDS, configure your database instances to use multi-AZ deployment within the same AWS Region. This separates the primary and standby database instances into separate Availability Zones, providing high availability while minimizing cross-AZ data transfer costs for your bidder nodes. +The [RTB Fabric modules](https://docs.aws.amazon.com/rtb-fabric/latest/userguide/modules.html) run filtering inline within the request path at the network layer, which adds negligible latency compared to forwarding requests to application compute. Network-layer execution skips the connection handling, deserialization, and business logic evaluation that application-layer processing requires. @@ -21 +70 @@ To optimize costs when configuring advertising bidder nodes to communicate with - 3. **Network configuration:** Configure your VPC and subnets to verify that bidder nodes and database nodes within the same AZ can communicate efficiently. Use private IP addresses, and avoid public IP addresses or internet gateways, which can incur additional data transfer costs. +The primary risk is a false positive, where the filter suppresses a request that would have received a valid bid. The holdbackPercentage parameter controls what fraction of matching traffic passes through the filter unaffected, which sets up an A/B comparison. A holdback of 90 means only 10% of matching traffic gets filtered, so you keep a large control group to confirm that filtered traffic produces no bids. Decrease holdback gradually (90, 50, 10, and 0) over several weeks so you can detect revenue impact at each stage before committing further. @@ -23 +72 @@ To optimize costs when configuring advertising bidder nodes to communicate with - 4. **Caching and replication:** Implement caching strategies and read replicas for your database nodes to reduce the amount of data transfer required between bidder nodes and database nodes. This can further minimize cross-AZ data transfer costs. +Your bidder's behavior changes as campaigns start and end, as new inventory types emerge, and as partner traffic composition shifts. A geo filter that correctly identifies no-bid traffic today might catch viable requests next month after a new campaign targets that geography. Without weekly recalibration against fresh no-bid logs, the gap between network-layer decisions and actual bidder decisions widens. @@ -25 +74 @@ To optimize costs when configuring advertising bidder nodes to communicate with - 5. **Monitoring and optimization:** Regularly monitor your data transfer costs and traffic patterns across AZs. Adjust your resource placement and network configurations as needed to optimize cost-effectiveness. +Filtering exists between supply operations (who manage partner relationships) and bidder engineering (who manage compute costs), so ownership needs to be clear. If supply operations change targeting parameters without notifying whoever maintains filter rules, you might see a spike in false positives. A defined owner and a change notification process between these teams keeps filters aligned with the current bidding strategy. @@ -27 +76 @@ To optimize costs when configuring advertising bidder nodes to communicate with - 6. **Use cost optimization tools:** Use [AWS Cost Explorer](https://aws.amazon.com/aws-cost-management/aws-cost-explorer/), [AWS Budgets](https://aws.amazon.com/aws-cost-management/aws-budgets/), and [AWS Cost Anomaly Detection](https://aws.amazon.com/aws-cost-management/aws-cost-anomaly-detection/) to monitor and analyze your costs, set budgets, and receive alerts for potential cost anomalies. +When you monitor rejection rates per partner, you can see which supply sources send the most traffic that produces no bids. Partners whose rejection rates exceed 20% are worth a conversation about improving bid request quality at the source, which reduces the network transfer you pay for on requests that will never pass validation. The SSP stops paying to transmit requests that generate no revenue, and the DSP stops paying to process them. @@ -28,0 +78 @@ To optimize costs when configuring advertising bidder nodes to communicate with +### Implementation steps @@ -29,0 +80,11 @@ To optimize costs when configuring advertising bidder nodes to communicate with + 1. **Analyze historical bid logs to identify filterable traffic patterns:** Query your bid event archive to identify the highest-volume no-bid reasons: missing required OpenRTB fields, unsupported protocol versions, floor prices below your minimum threshold, geographies you never target, and device types outside your buying interest. Quantify the traffic volume each category represents. Prioritize patterns with 90%+ no-bid rates and high request volume. + + 2. **Configure RTB Fabric OpenRTB Filter with holdback testing:** Enable the OpenRTB Filter module targeting the highest-volume no-bid categories. Set initial holdbackPercentage to 90 (only 10% of matching traffic is filtered). Use headerTag to mark filtered requests for A/B analysis without dropping them. This validates filter accuracy before committing to blocking. + + 3. **Reduce holdbackPercentage gradually over 2-4 weeks:** After confirming filter accuracy through holdback comparison, reduce holdbackPercentage in stages: 90 to 50 to 10 to 0. Validate at each stage that bid metrics (win rate and revenue) remain stable for the unfiltered cohort. If revenue drops, investigate which filter rule is producing false positives. + + 4. **Configure Rate Limiter module to protect downstream systems:** Set per-link maximum TPS caps based on your bidder's healthy throughput threshold. This helps protect downstream compute from unfiltered traffic spikes regardless of filter configuration. Size the cap to accommodate peak legitimate traffic without dropping viable requests. + + 5. **Iterate weekly to promote new no-bid patterns to filter rules:** Compare application-level no-bid logs against existing network-layer filter rules weekly. Identify new no-bid patterns that appear consistently (for example, a new inventory type your bidder doesn't support). Promote them to network-layer filter rules with holdback testing. Alert when per-filter bid-rate metrics shift, indicating the pattern may no longer be safe to filter. + + 6. **Engage partners with high per-partner rejection rates:** Track rejection rates per partner link in CloudWatch. Engage partners with rejection rates exceeding 20% to improve bid request quality at the source. Provide specific data: which segments produce zero bids, what volume they represent, and what targeting filters would suppress them. @@ -32 +92,0 @@ To optimize costs when configuring advertising bidder nodes to communicate with -## Key AWS services @@ -34 +93,0 @@ To optimize costs when configuring advertising bidder nodes to communicate with -[Network Load Balancer (NLB) ](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html) @@ -38 +97,19 @@ To optimize costs when configuring advertising bidder nodes to communicate with - * [Exploring Data Transfer Costs for AWS Managed Databases](https://aws.amazon.com/blogs/architecture/exploring-data-transfer-costs-for-aws-managed-databases/) +**Related best practices:** + + * [ADVCOST03-BP04 Shape outbound traffic and optimize no-bid handling](./advcost03-bp04.html) + + + + +**Related documents:** + + * [AWS RTB Fabric Modules Documentation](https://docs.aws.amazon.com/rtb-fabric/latest/userguide/modules.html) + + + + +**Related services:** + + * [AWS RTB Fabric](https://aws.amazon.com/rtb-fabric/) + + * [Amazon CloudWatch](https://aws.amazon.com/cloudwatch/) @@ -49 +126 @@ To use the Amazon Web Services Documentation, Javascript must be enabled. Please -ADVCOST03-BP02 When integrating SSPs and DSPs for programmatic advertising, co-locate the platforms +ADVCOST03-BP02 Implement Availability Zone affinity across the RTB data path @@ -51 +128 @@ ADVCOST03-BP02 When integrating SSPs and DSPs for programmatic advertising, co-l -Database optimization +ADVCOST03-BP04 Shape outbound traffic and optimize no-bid handling