All fields

“Performance Optimization & Profiling” in Information Technology

77 questions across 3 technologies.

Information Technology

77 questions in 3 technologies

#QuestionTechnologyTopicLevel
1What is the difference between vertical and horizontal performance optimization strategies for a Node.js application, and how do you decide which to pursue first? Node.js › Performance Optimization & ProfilingNode.jsPerformance Optimization & ProfilingIntermediate
2What is JIT (Just-In-Time) compilation deoptimization in V8, and how can you detect when it's hurting a hot function's performance? Node.js › Performance Optimization & ProfilingNode.jsPerformance Optimization & ProfilingAdvanced
3How would you optimize a Node.js application's JSON serialization performance for API responses with very large or very frequent payloads? Node.js › Performance Optimization & ProfilingNode.jsPerformance Optimization & ProfilingAdvanced
4How would you generate and interpret a CPU profile for a Node.js application using the built-in --prof flag? Node.js › Performance Optimization & ProfilingNode.jsPerformance Optimization & ProfilingIntermediate
5What is load testing, and how would you use a tool like autocannon or k6 to benchmark a Node.js API's throughput and latency? Node.js › Performance Optimization & ProfilingNode.jsPerformance Optimization & ProfilingIntermediate
6How do you profile a MAUI app to find performance bottlenecks? .NET MAUI › Performance & Optimization.NET MAUIPerformance & OptimizationAdvanced
7How do you profile a MAUI app to find performance bottlenecks? .NET MAUI › Performance & Optimization.NET MAUIPerformance & OptimizationAdvanced
8What is caching, and why is it commonly used to improve the performance of a Node.js application? Node.js › CachingNode.jsCachingBeginner
9What is HTTP keep-alive, and how does it improve performance for a Node.js server handling many requests from the same client? Node.js › HTTP & Web ServersNode.jsHTTP & Web ServersIntermediate
10What is an APM (Application Performance Monitoring) tool, and what capabilities does it typically add beyond basic logging? Node.js › Logging & MonitoringNode.jsLogging & MonitoringIntermediate
11What is monkey-patching in the context of Node.js APM (Application Performance Monitoring) tools, and what are its risks? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
12What is database indexing, and how does an index improve query performance in a Node.js application's database layer? Node.js › DatabasesNode.jsDatabasesAdvanced
13How would you use the 'clinic.js' toolset (clinic doctor, clinic flame) to diagnose a Node.js performance problem? Node.js › Debugging & DiagnosticsNode.jsDebugging & DiagnosticsAdvanced
14What is the difference between fs.readFile() and fs.createReadStream() for reading a file in Node.js? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingBeginner
15What is the difference between running async operations sequentially with multiple awaits versus concurrently with Promise.all()? Node.js › Async PatternsNode.jsAsync PatternsIntermediate
16What is job concurrency in a worker process, and how do you configure it safely in BullMQ? Node.js › Background Jobs & QueuesNode.jsBackground Jobs & QueuesIntermediate
17How would you track and expose the progress of a long-running background job to the client that requested it? Node.js › Background Jobs & QueuesNode.jsBackground Jobs & QueuesIntermediate
18What HTTP caching headers (Cache-Control, ETag) can a Node.js/Express API use to let clients and CDNs cache responses? Node.js › CachingNode.jsCachingIntermediate
19How would you implement a Least Recently Used (LRU) cache in Node.js, and why is eviction necessary for an in-memory cache? Node.js › CachingNode.jsCachingIntermediate
20What is memoization, and how does it differ from a general-purpose external cache like Redis? Node.js › CachingNode.jsCachingIntermediate
21Why does Node.js provide a cluster module, given that a single Node.js process is single-threaded? Node.js › Clustering & Worker ThreadsNode.jsClustering & Worker ThreadsIntermediate
22What is the difference between the number of CPU cores and the optimal number of cluster workers for a given Node.js application? Node.js › Clustering & Worker ThreadsNode.jsClustering & Worker ThreadsIntermediate
23How do you gracefully terminate a worker thread, and what's the difference between worker.terminate() and letting it exit naturally? Node.js › Clustering & Worker ThreadsNode.jsClustering & Worker ThreadsIntermediate
24What does the node:zlib module provide, and how would you use it to compress an HTTP response? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesIntermediate
25What is a database connection pool, and why does a Node.js application need one rather than opening a new connection per request? Node.js › DatabasesNode.jsDatabasesIntermediate
26What is database normalization, and what specific problems can over-normalization or under-normalization cause? Node.js › DatabasesNode.jsDatabasesIntermediate
27What is the N+1 query problem, and how does it commonly arise in a Node.js application using an ORM? Node.js › DatabasesNode.jsDatabasesIntermediate
28What is a multi-stage Docker build, and why is it commonly used for Node.js applications? Node.js › Docker & DeploymentNode.jsDocker & DeploymentIntermediate
29What is the purpose of setting explicit CPU and memory resource requests and limits for a Node.js container in Kubernetes? Node.js › Docker & DeploymentNode.jsDocker & DeploymentIntermediate
30What does 'non-blocking I/O' mean, and how does a Node.js function like fs.readFile() achieve it compared to fs.readFileSync()? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOIntermediate
31How does setImmediate() differ from process.nextTick() in terms of timing and typical use cases? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOIntermediate
32How does the event loop handle a large synchronous loop (like processing a huge array with a for loop), and what problem does this cause? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOIntermediate
33How would you measure how 'busy' the event loop is in a running Node.js process using a simple technique? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOIntermediate
34What is the difference between fs.appendFile() and opening a file with the 'a' flag and writing to it manually? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingIntermediate
35How would you copy a large file efficiently in Node.js, and what's the difference between fs.copyFile() and manually piping streams? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingIntermediate
36What is the difference between npm, Yarn, and pnpm as Node.js package managers, and what specific advantage does pnpm offer regarding disk space? Node.js › Git & Project ManagementNode.jsGit & Project ManagementIntermediate
37What is the difference between HTTP/1.1 and HTTP/2, and how does Node.js support HTTP/2 via the node:http2 module? Node.js › HTTP & Web ServersNode.jsHTTP & Web ServersIntermediate
38What is the purpose of the Content-Length and Transfer-Encoding: chunked headers, and why can't a response use both simultaneously? Node.js › HTTP & Web ServersNode.jsHTTP & Web ServersIntermediate
39What Redis data structures beyond simple string values are useful for a Node.js application, and what are they typically used for? Node.js › Caching with RedisNode.jsCaching with RedisIntermediate
40How would you read a large file efficiently using a stream rather than loading it entirely into memory with fs.readFile()? Node.js › File System (fs) ModuleNode.jsFile System (fs) ModuleIntermediate
41What is over-fetching and under-fetching in REST APIs, and how does GraphQL specifically address both? Node.js › GraphQL with Node.jsNode.jsGraphQL with Node.jsIntermediate
42What is HTTP keep-alive, and how does Node's http.Agent manage connection reuse for outgoing requests? Node.js › HTTP & HTTPS ModulesNode.jsHTTP & HTTPS ModulesIntermediate
43What is the V8 JavaScript engine, and what role does it play within the Node.js runtime? Node.js › Node.js Fundamentals & Runtime ArchitectureNode.jsNode.js Fundamentals & Runtime ArchitectureIntermediate
44What is the libuv library, and what specific role does it play inside Node.js? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
45How do you use the --inspect flag and Chrome DevTools to profile a running Node.js application in production? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
46What is V8's hidden class mechanism, and why does it matter for writing performant Node.js code? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
47What is backpressure in Node.js streams, and how do you handle it correctly when piping data? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
48How would you implement a concurrency-limited task queue in Node.js to process many async tasks without overwhelming a downstream resource? Node.js › Async PatternsNode.jsAsync PatternsAdvanced
49How do you implement job prioritization in a Node.js queue system, and when is it necessary? Node.js › Background Jobs & QueuesNode.jsBackground Jobs & QueuesAdvanced
50What is cache stampede (thundering herd), and how do you prevent it in a high-traffic Node.js service? Node.js › CachingNode.jsCachingAdvanced
51What is the 'stale-while-revalidate' caching strategy, and how would you implement it for an API response? Node.js › CachingNode.jsCachingAdvanced
52What is multi-tier caching (combining an in-memory L1 cache with a distributed L2 cache), and what problem does it solve? Node.js › CachingNode.jsCachingAdvanced
53How would you implement a write-behind (write-back) caching strategy, and what durability risk does it introduce? Node.js › CachingNode.jsCachingAdvanced
54What is auto-scaling, and what metrics commonly trigger scaling decisions for a Node.js service running in the cloud? Node.js › Cloud & DevOpsNode.jsCloud & DevOpsAdvanced
55How do you use SharedArrayBuffer to share memory directly between Node.js worker threads, and what are the safety considerations? Node.js › Clustering & Worker ThreadsNode.jsClustering & Worker ThreadsAdvanced
56What is a worker thread pool, and why would you build one rather than creating a new Worker for every task? Node.js › Clustering & Worker ThreadsNode.jsClustering & Worker ThreadsAdvanced
57What does the node:perf_hooks module provide, and how would you use it to measure precise execution time of a code block? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesAdvanced
58What is database replication, and how does a Node.js application typically route reads to replicas while sending writes to a primary? Node.js › DatabasesNode.jsDatabasesAdvanced
59What is database sharding, and what problem does it solve that replication alone doesn't address? Node.js › DatabasesNode.jsDatabasesAdvanced
60What is a database connection leak in a Node.js application, and how does it typically happen when using a connection pool? Node.js › DatabasesNode.jsDatabasesAdvanced
61How would you optimize Docker layer caching in a Node.js Dockerfile to speed up repeated builds during development? Node.js › Docker & DeploymentNode.jsDocker & DeploymentAdvanced
62What is 'event loop lag' (or 'event loop delay'), and how would you monitor it in a production Node.js application? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOAdvanced
63What is the poll phase of the event loop, and under what specific conditions does it block waiting versus move on immediately? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOAdvanced
64How would you implement a request-logging middleware in Express that captures method, path, status code, and response time for every request? Node.js › Express & MiddlewareNode.jsExpress & MiddlewareAdvanced
65How would you implement conditional middleware in Express that only applies to certain requests based on a runtime condition? Node.js › Express & MiddlewareNode.jsExpress & MiddlewareAdvanced
66How would you implement a global request timeout middleware in Express to prevent a slow request from hanging indefinitely? Node.js › Express & MiddlewareNode.jsExpress & MiddlewareAdvanced
67How would you implement a directory-size calculator in Node.js that recursively sums the size of all files within a directory tree? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingAdvanced
68What is the N+1 query problem in GraphQL specifically, and how does DataLoader solve it? Node.js › GraphQLNode.jsGraphQLAdvanced
69How would you implement query complexity analysis or depth limiting in a GraphQL API to prevent a maliciously deep or expensive query from overwhelming the server? Node.js › GraphQLNode.jsGraphQLAdvanced
70How would you implement HTTP/2 server push in Node.js, and why has server push become less commonly recommended over time? Node.js › HTTP & Web ServersNode.jsHTTP & Web ServersAdvanced
71How would you implement HTTP/2 or HTTP/1.1 connection pooling on the client side in Node.js when making many outgoing requests to the same downstream API? Node.js › HTTP & Web ServersNode.jsHTTP & Web ServersAdvanced
72How would you implement HTTP response streaming in Node.js to begin sending data to a client before the entire response is ready, such as for a large report? Node.js › HTTP & Web ServersNode.jsHTTP & Web ServersAdvanced
73What is the N+1 query problem in the context of an ORM like Mongoose or Sequelize, and how do you avoid it? Node.js › Databases & ORMs (MongoDB/Mongoose, SQL/Sequelize)Node.jsDatabases & ORMs (MongoDB/Mongoose, SQL/Sequelize)Advanced
74What does PM2's built-in monitoring dashboard (pm2 monit, or PM2 Plus) show, and what metrics are most useful for production operations? Node.js › Deployment & Process Managers (PM2)Node.jsDeployment & Process Managers (PM2)Advanced
75What are Node.js file descriptor limits, and how might a Node.js application unintentionally exhaust them? Node.js › File System (fs) ModuleNode.jsFile System (fs) ModuleAdvanced
76What is the N+1 query problem specific to GraphQL, and how does DataLoader solve it? Node.js › GraphQL with Node.jsNode.jsGraphQL with Node.jsAdvanced
77How would you implement HTTP/2 server push or basic HTTP/2 support in Node.js using the node:http2 module? Node.js › HTTP & HTTPS ModulesNode.jsHTTP & HTTPS ModulesAdvanced