计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
nestjs-performance【效率与协作】Optimize NestJS throughput with Fastify adapter, singleton scope enforcement, compression, and query projections. Use when switching to Fastify, diagnosing request-scoped bottlenecks, or profiling API overhead.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
FastifyAdapter for ~2x throughput.REQUEST scope chains.select: [] on all repository queries.http.Agent keep-alive settings to reuse TCP connections for upstream services.SINGLETON scope (default).REQUEST scope unless absolutely necessary.durable: true) for multi-tenancy.LazyModuleLoader for heavyweight modules (e.g., Admin panels).@nestjs/cache-manager for computation results.Cache-Control headers for client-side caching (CDN/Browser).@nestjs/bull (BullMQ) or RabbitMQ (@nestjs/microservices).class-transformer CPU expensive.fast-json-stringify (built-in fastify serialization) instead of interceptors.select: [] to fetch only needed columns.relations carefully or DataLoader for Graph/Field resolvers.pool: { min: 2, max: 10 }) in config to match DB limits.Total Duration, DB Execution Time, and API Overhead.worker_threads.ClusterModule to utilize all CPU cores. In K8s, prefer ReplicaSets.worker_threads or BullMQ.select: [] needed columns to avoid serializing unused data.