Dev blog by Jaeyong Choi (jaeyonging), a frontend and full-stack developer. I write about web development with React, TypeScript and Node.js, the sites I built myself, and my project notes.
In my exchange WebSocket post I said I batched rendering with rAF, but there were no numbers at all. Replaying recorded real prices, there was almost no difference normally, and it only split into 7.6fps and 37.6fps when a slow phone met a busy market.
My crypto mock trading site had no tests at all, so I started with liquidation math and the reconnecting socket using Vitest. 1 of 26 tests failed, and it was a real bug: with several cross positions, the same cash was counted as lost more than once.
I switched travel times to real road times, but stay time was still 90 minutes for any attraction. I reset it per place using tourism category codes and name rules, then recalculated 27 real itineraries with the old and new rules.
On October 7, 9 services stopped responding together for 80 minutes. Not a single down mail went out, and only 9 recovery mails arrived. I changed the status page to group failures in the same time window into a common outage and show them separately.
I had the screen wait for the visitor count API, so the home's post list request was stuck in line behind it. I made it stop waiting, and with a simulated mobile connection the home went from 3.98 to 3.39 seconds.
Health check records piled up every minute with no code to delete them, so the status page query scanned the whole table every time. With a daily summary table and deleting only success rows after 30 days, the query went from 0.68s to 0.012s.
After adding code block highlighting I checked the home page requests and found the 71KB highlight.js used only on post pages. The cause was Rollup's CommonJS helper, and for the same reason lodash had been loading on the home page for over a year.
Because of wildcard DNS and the Apache default vhost, nonexistent subdomains landed on my blog and rendered a blank page. How I settled file order, the wildcard cert, status codes and noindex while replacing it with a landing page.
I went back through the records of 270,000 checks. Checking the public domain was a good call. Self-monitoring, sequential checks, endless history and tokens in logs need fixing.
31 failures piled up with 0 alerts. Alerting on every failure meant 58 emails, 2 in a row meant 4. I counted from the records first, then added alerts on state change.