Backtracking: When a chosen path fails to satisfy every goal, the engine automatically rewinds and tries the next alternative. Backtracking is a search strategy. The program tries an option, and if it leads to a dead end, it goes back to the last choice point and tries the next option. Logic languages like Prolog do this automatically. Regular expression engines use it too: when part of a pattern fails, the engine gives back characters and tries another way to match.
That second case has a practical risk. Some regex patterns, such as nested repetition like (a+)+$, can backtrack an enormous number of times on certain inputs. A short malicious string can then keep a server busy for seconds or minutes, which is known as ReDoS. Avoid nested quantifiers, test patterns with long non-matching input, and set limits where your language offers them.
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or when debugging dependency cycles between application layers.