SpinTheMic
Pro

Interview practice question

Expensive client created on every startup

Backend Engineering · OOP and Design Patterns · Intermediate

Your service creates a heavy machine learning client at startup even though only one rare endpoint uses it, slowing startup significantly. What design could help?

What a strong answer covers

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

  • Lazy initialisation.
  • Virtual proxy pattern.
  • Create on first use, thread-safe.
  • Or move to separate service.
  • Consider warm-up trade-offs.
Practise this topic

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

See all topics