Skip to main content
InterviewHubPRO
Section Overview
Q49

Question 49 of 50

Part 3: Distributed Systems, Kestrel Internals & Scalability (25 - 35)

98%
ASP.NET Core & Web API (50 Qs)•Part 3: Distributed Systems, Kestrel Internals & Scalability (25 - 35)

Configuration & Options Pattern: `IOptions` vs `IOptionsSnapshot` vs `IOptionsMonitor`.

senior LevelSystem Design

In Simple Words:

  • IOptions<T>: Singleton lifetime. Evaluates configuration once on application startup. Does not reflect changes to appsettings.json without app restart.
  • IOptionsSnapshot<T>: Scoped lifetime. Re-evaluates configuration per HTTP request; reflects live changes in appsettings.json.
  • IOptionsMonitor<T>: Singleton lifetime. Listens for live file changes on disk and notifies via OnChange() events.