Cost asymmetry
A denial-of-service attack works when it costs the attacker much less to send a request than it costs you to answer it. A raw bandwidth flood needs a large botnet. A search endpoint that runs an unindexed query needs a laptop.
Search with a leading wildcard, reports over an unbounded date range, exports, password hashing on login, image resizing, deep pagination. Each is a legitimate feature and each is an amplifier.
Why the edge does not save you
Upstream scrubbing is built to recognize traffic that is abnormal in volume or shape. A few hundred well-formed requests per second, from many addresses, to a real URL, looks like a busy afternoon. It reaches your application, and your database falls over while the bandwidth graph stays flat.
The fix is in the application
Measure what every endpoint costs. Add the index, cap the range, paginate, cache, and put a timeout on every query. Give each client a budget based on cost and not only on request count. Decide in advance what the system stops doing when it is saturated, so the critical path survives. Then test it yourself before someone else does.
Related: DDoS counter-measures →Penetration testing & audits →