Interview Cheat Sheet: Backend/Fullstack Engineer¶
Night-before review. Key patterns, talking points, and terms for the NestJS/GraphQL/PostgreSQL stack. Bridged from your JVM/Scala/Rust background.
Your Unique Angles¶
| Their need | Your strength | Talking point |
|---|---|---|
| NestJS architecture | Spring/Scala DI expertise | "Same DI patterns, different syntax -- I'll be productive fast" |
| GraphQL | Type system expertise (Scala 3, Rust) | "I think in types; GraphQL schema design is natural" |
| PostgreSQL | Database experience from JVM projects | "I know EXPLAIN ANALYZE and index tuning from production" |
| Scaling | Akka actors, distributed systems MSc | "BullMQ jobs = Akka actors with persistence" |
| Auth/security | Unix security model, SSH expertise | "Security is in my DNA from Linux systems work" |
| Mentoring | 5 years daily coding, architecture mindset | "I lead by writing clear, reviewable code" |
JVM → NestJS Translation Table¶
| JVM/Scala | NestJS | Notes |
|---|---|---|
@Autowired / ZIO Layer |
@Injectable() + constructor DI |
Same concept, decorators instead of annotations |
@Configuration |
@Module() |
Module = bounded context |
@PreAuthorize |
@UseGuards(RolesGuard) |
Guards = authorization layer |
AOP @Around |
@UseInterceptors() |
Interceptors wrap handler execution |
| Bean Validation | class-validator + ValidationPipe |
Decorators on DTO classes |
| Akka Actor | BullMQ Job + Processor | Queue = mailbox, processor = actor |
Sangria ObjectType |
@ObjectType() |
Code-first GraphQL |
| Slick / JPA Entity | TypeORM @Entity() |
Decorator-based ORM |
Key Patterns to Know¶
NestJS Execution Pipeline¶
Request → Middleware → Guard → Interceptor(pre) → Pipe → Handler → Interceptor(post) → Response
↓ on error
Exception Filter
GraphQL Subscriptions (real-time VNC events)¶
Horizontal Scaling¶
Load Balancer → NestJS Node 1 ──┐
→ NestJS Node 2 ──┤── Redis (sessions, PubSub, rate limits, BullMQ)
→ NestJS Node N ──┘── PostgreSQL + PgBouncer (connection pooling)
Questions They Might Ask¶
-
"Design the backend for our AI agent session management." → NestJS service creates Kubernetes pod via BullMQ job. WebSocket gateway streams VNC frames + AI actions. GraphQL subscriptions push status. PostgreSQL stores session log (JSONB). RLS isolates tenants.
-
"How would you handle 10,000 concurrent WebSocket connections?" → Socket.io with Redis adapter (broadcasts across nodes). Stateless NestJS behind round-robin LB. Redis for session state. Health checks via terminus.
-
"Your SQL queries are slow. How do you diagnose?" →
EXPLAIN (ANALYZE, BUFFERS). Look for Seq Scans on large tables (missing index), Nested Loops with high actual rows (N+1), Sort with external merge (insufficient work_mem). Checkpg_stat_user_tablesfor dead tuples (vacuum needed). -
"How do you prevent the N+1 problem in GraphQL?" → DataLoader: batch
.load(id)calls within one tick into a singleWHERE id IN (...). Per-request scoping via GraphQL context factory. 51 queries → 2 queries.
Numbers to Know¶
- NestJS 11: Express v5 + Fastify v5, breaking route syntax changes
- PostgreSQL 17: incremental backup (78min → 4min recovery), JSON_TABLE
- PgBouncer: ~2KB per connection vs PostgreSQL's ~5-10MB
- BullMQ: Redis-backed, supports retries, priorities, rate limiting, progress
- Argon2id: OWASP recommended, 19 MiB memory, 2 iterations minimum
- TypeORM: maintenance mode for new features; Drizzle gaining ground
- GraphQL subscriptions: graphql-ws protocol (not subscriptions-transport-ws)