
Performance & Cloud Deployment
Event loop, blocking I/O, profiling, memory leaks, query optimization, compression, clustering, worker threads, load balancing, strategic caching (Redis + HTTP), AWS (ECS, Lambda), serverless, deployment strategies (blue/green, canary)
1Which approach optimizes NestJS container deployment in AWS ECS?
Which approach optimizes NestJS container deployment in AWS ECS?
Odpowiedź
To optimize ECS deployment of NestJS containers: use multi-stage Docker builds to reduce final image size (build stage + minimal production stage), leverage Docker layer caching to accelerate builds, use ECR (Elastic Container Registry) in same region to reduce latency, configure appropriate health checks, use Fargate to simplify management, define optimal resource limits (CPU/memory), implement graceful shutdown for SIGTERM. An optimized Node.js alpine image can be <100MB vs >1GB unoptimized.
2What are the main phases of the Node.js event loop?
What are the main phases of the Node.js event loop?
Odpowiedź
The Node.js event loop has six main phases: timers (setTimeout/setInterval), pending callbacks (deferred I/O callbacks), idle/prepare (internal), poll (retrieve new I/O events), check (setImmediate), and close callbacks. Each phase has a FIFO queue of callbacks to execute. The poll phase is most important as it handles I/O events.
3What is the impact of a blocking operation (blocking I/O) in Node.js?
What is the impact of a blocking operation (blocking I/O) in Node.js?
Odpowiedź
A blocking operation in Node.js blocks the entire event loop, preventing all other operations from being processed. This severely degrades performance since Node.js is single-threaded. Synchronous operations like fs.readFileSync, crypto.pbkdf2Sync, or intensive loops block the main thread. Always use asynchronous versions or delegate to worker threads.
How to identify a memory leak in a Node.js production application?
Which tool to use for CPU performance profiling in a NestJS application?
+27 pytań z rozmów
Inne tematy rekrutacyjne Node.js / NestJS
Node.js Fundamentals
Node.js Core APIs
Asynchronous Programming
Express.js Basics
NestJS Fundamentals
REST API Design
Validation & DTO
API Documentation & Contracts
Error Handling
Unit Testing
Task Scheduling
NestJS Modules & DI
Configuration & Environment Management
JWT Authentication
Authorization & RBAC
Database with TypeORM
Prisma ORM
Middleware & Interceptors
File Upload
WebSockets
GraphQL with NestJS
End-to-End Testing
Caching with Redis
Queues with Bull
DevOps, Logging & CI/CD
Docker & Containerization
Microservices
Security Best Practices
Opanuj Node.js / NestJS na następną rozmowę
Uzyskaj dostęp do wszystkich pytań, flashcards, testów technicznych, ćwiczeń code review i symulatorów rozmów.
Zacznij za darmo