~/talk

Architect for Scale - My Learnings in Node.js (A case study)

Talkat JSFoo Coimbatore 2019 · on Saturday, 2019-06-08· [nodejs]

Cluster shows 15 nodes and one process restarts every 20 minutes due to a memory leak traced with flame graphs and heap dumps (heap dump needs ~2x memory so not viable in production). Root causes include a long‑lived object in a short request scope and an off‑by‑one ++ bug. Logging via Winston slow adds ~400 ms (328 ms spent sending logs); writing to stdout and piping works better. Authentication uses MD5 and predictable non‑expiring tokens; fix is random tokens plus an HMAC keyed by the stored password, and use bcrypt/argon2 for hashing.

AI-written summary · about

  1. 0:00musings of
  2. 1:27can write bug free code
  3. 5:19Who can debug this?
  4. 5:39There is coredump
  5. 6:12Node debug?
  6. 9:22Monitor? How?
  7. 10:40Re-start the process before it locks you out
  8. 12:34Response Latency
  9. 13:01Winston, anyone?
  10. 14:13Data
  11. 14:24Why it's an overkill.
  12. 15:05Pipe it to another process
  13. 15:44What about debugging? Logs FTW!
  14. 16:56Introducing Consul
  15. 17:26Reactive Config
  16. 18:57legacy system had insecure auth code
  17. 20:27Non-volatile tokens
  18. 20:41HMAC a random string with the user's current password
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.