Full-Stack Development Case Studies & Practical Application 3 — Questions and Answers
Question 1: A SaaS dashboard loads a 50,000-row data table in the browser, causing the UI to freeze on render. What is the most effective solution?
- Compress the JSON payload with gzip
- Implement server-side pagination and only fetch the current page of rows (Correct answer)
- Use Web Workers to parse the JSON off the main thread
- Replace the table with a chart
Correct answer: Implement server-side pagination and only fetch the current page of rows
Server-side pagination sends only the visible subset of data, drastically reducing DOM nodes and render time.
Question 2: A REST API endpoint is being called 10,000 times per second by a single client bot, causing service degradation for real users. What is the correct infrastructure-level response?
- Add more application servers
- Implement rate limiting per IP or API key at the gateway layer (Correct answer)
- Increase database connection pool size
- Switch to GraphQL
Correct answer: Implement rate limiting per IP or API key at the gateway layer
Rate limiting at the gateway rejects excess requests before they reach the application, protecting backend resources.
Question 3: A mobile app sends user passwords in the request body over HTTPS. A developer suggests hashing passwords client-side before sending. Why is this NOT a security improvement?
- HTTPS already encrypts the body, so the hash becomes the effective password and adds no protection (Correct answer)
- Mobile devices cannot perform hashing efficiently
- Hashing algorithms are illegal on mobile platforms
- Server-side validation cannot verify hashed passwords
Correct answer: HTTPS already encrypts the body, so the hash becomes the effective password and adds no protection
If the hash is transmitted as the credential, an attacker who captures the hash can replay it — the hash just becomes a new plaintext password.
Question 4: A team's CI pipeline takes 45 minutes, slowing delivery. Tests are split into unit, integration, and end-to-end suites. What reorganization cuts pipeline time most effectively?
- Remove the end-to-end tests entirely
- Run all three suites sequentially after each push
- Run unit tests first; fail fast, then run integration and E2E in parallel only if unit tests pass (Correct answer)
- Run only end-to-end tests since they cover everything
Correct answer: Run unit tests first; fail fast, then run integration and E2E in parallel only if unit tests pass
Fast unit tests act as a cheap gatekeeper; expensive E2E tests run in parallel only when the cheap gate passes, minimizing wasted CI minutes.
Question 5: A Node.js API server crashes every few hours with 'heap out of memory' errors under normal load. What is the most likely cause and first diagnostic step?
- The server lacks sufficient CPU cores — add more CPUs
- There is likely a memory leak; use a heap profiler like Node's --inspect flag to record allocations over time (Correct answer)
- Node.js has a hard 512 MB limit that cannot be changed
- The database is returning too much data — add LIMIT clauses everywhere
Correct answer: There is likely a memory leak; use a heap profiler like Node's --inspect flag to record allocations over time
Periodic OOM crashes under normal load are the classic symptom of a memory leak; heap profiling reveals which objects are accumulating.
Question 6: An API returns user objects including sensitive fields like password_hash and internal_notes to all callers. What pattern ensures only safe fields are exposed?
- Encrypt the entire response body
- Use a serializer or DTO layer that explicitly allowlists output fields before sending the response (Correct answer)
- Require admin authentication for all endpoints
- Store sensitive fields in a separate database table
Correct answer: Use a serializer or DTO layer that explicitly allowlists output fields before sending the response
A serializer/DTO explicitly maps internal models to safe public shapes, preventing accidental data exposure as the model evolves.
Question 7: A team deploys a new feature behind a feature flag. After monitoring shows 2% error rate increase, what is the correct next step before investigating root cause?
- Roll back the entire application to the previous release
- Disable the feature flag to immediately halt exposure while preserving the new code for investigation (Correct answer)
- Increase server capacity to absorb the errors
- Email affected users an apology
Correct answer: Disable the feature flag to immediately halt exposure while preserving the new code for investigation
Disabling the flag instantly stops user impact while keeping the code in place, enabling safe investigation without a full rollback.
A SaaS dashboard loads a 50,000-row data table in the browser, causing the UI to freeze on render.
What is the most effective solution?