How a Transaction We Forgot to Close Took Down a ServiceA survey API went down at 155 requests a minute. The database was fine the whole time. The bug was hiding in between. One request took 145 seconds. Only 65 milliseconds of it was real database work. TAug 13 · 4 min readsrekaravarshan.hashnode.dev
Part 7: Closing the LoopWhat no one teaches you about the JavaScript Event Loop — Part 7 of 8 A puzzle that exposes await async function f() { console.log('A'); await Promise.resolve(); console.log('B'); awaJul 11 · 23 min readsrekaravarshan.hashnode.dev
Part 6: Microtasks and Why Two QueuesWhat no one teaches you about the JavaScript Event Loop — Part 6 of 8 A puzzle, slightly harder Promise.resolve().then(() => { console.log('1'); Promise.resolve().then(() => console.log('2'))Jul 11 · 28 min readsrekaravarshan.hashnode.dev
Part 5: The Event Loop, MechanicallyWhat no one teaches you about the JavaScript Event Loop — Part 5 of 8 A puzzle, with the answer on the line console.log('1'); setTimeout(() => console.log('2'), 0); Promise.resolve().then(() => consoJul 11 · 27 min readsrekaravarshan.hashnode.dev
Part 4: Where JavaScript Actually RunsWhat no one teaches you about the JavaScript Event Loop — Part 4 of 8 A puzzle in DevTools Open any page in your browser. Open DevTools. Click the Performance tab. Hit the record button (the circle).Jun 17 · 29 min readsrekaravarshan.hashnode.dev