Slide 22
Slide 22 text
Avoid blocking the event loop; specifically, CPU heavy tasks
● Immediate suspects: large JSONs, RegEx, SSR
○ REDoS, JSON DoS
○ Size limits
○ Use async/stream friendly JSON parsers (bfj, JSONStream)
○ Offload server side rendering (react/vue/angular) to workers
● Offload heavy tasks to workers, remote processes (piscina)
● Limit loops, recursion, etc.
● Avoid sync functions
Thou shalt not block!