SpinTheMic
Pro

Interview practice question

A regex takes down the service

Backend Engineering · Language Runtimes · Intermediate

A single request containing a long string made your service's CPU spike to 100 percent for minutes. Investigation points to a regular expression. What happened?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Catastrophic backtracking (ReDoS).
  • Nested quantifiers like (a+)+.
  • Rewrite regex, avoid ambiguity.
  • Limit input length; timeouts.
  • Use linear-time engines (RE2).
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics