All questions

We are adding a dozen audiences, will evaluation start to drag on each request?

Asked by Camille Roux on

CRCamille Roux

We are scaling from two audiences to more than a dozen on the same set of slots. I am a bit worried about how it behaves when I add many audience, because each one is evaluated on the request and I do not want that to pile up latency in the App Router.

Does having many audiences meaningfully slow down evaluation per request, or is the cost basically flat? Curious how this works internally.

Was this helpful?

3 answers

PRPriya Raghavan

audiences are just CQL conditions evaluated in real time per interaction, and CQL is built specifically for fast evaluation, it targets under 20ms. adding more small conditions is not the thing that blows up your budget. the whole pipeline is quoted end to end under 90ms at P95, evaluation is a small slice of that. fwiw there is a decent breakdown in what the sub-90ms figure actually covers.

Was this helpful?
RFRenata Fuchs

From lived experience, we run well over a dozen audiences on the same slots and evaluation still comes back instant, it never became the bottleneck for us. Coming off a tool where every rule added measurable client-side weight, this was a relief. Add the audiences you actually need and measure, but do not pre-optimise against a count problem that has not shown up for us.

Was this helpful?
Ddsimmons

One thing worth separating so nobody gets scared by it: there is a "Too complex query" error, but that is about the size of a single query, not how many audiences you have. A dozen small, well-scoped conditions is a completely different shape from one giant expression. If you ever do hit it, it is a signal to split one oversized condition, see the too-complex-query thread. Many small audiences will not trip it.

Was this helpful?
Still have questions?