3 ms·
I became the SME for batch processing on this project. The whole project was a read heavy workflow that should have had all decisions made at write time but was
by hinkley 1y ago
I became the SME for batch processing on this project. The whole project was a read heavy workflow that should have had all decisions made at write time but was so far in the weeds when I got there that I couldn’t pull it out. And everyone I convinced of this fact decided to work somewhere else instead of stay and help fix it.
But there were parts we could sort out at build or deploy time, and I was able to fix a number of those.
One guy was tasked with a project I got turned into an epic: build fallback error pages at deploy time and push them into CDN. I told him not to build it the way he was, copy the one I had been working on. I got busy and he left, and we discovered that they hadn’t been updating when a customer changed their contact info and noticed months later that we still had the old info.
The build trigger had no downstream dependencies and there was no alert being sent for failure. The job was timing out for reasons similar to the ones I’d fixed. I tried to bandaid it still errored out an hour into what looked like at least a 100-120 minute workload.
I discovered the main problem was that our customers could have multiple domain names and he was frobbing through three or four service calls trying to find the canonical one, and making one call per customer to see if they were still customers (we had an endpoint that would paginate all active customers, so ~400x more efficient and rising due to turnover).
The main table I had been using had one column I didn’t use, which had a url in it. I confirmed with our SME that this was in fact the canonical domain name, I just had to add the field to the QL and do a `new URL(url).hostname`. At the end of the day I ended up extracting about half the code from my tool, deleting over half of his code and replacing it with calls into mine (do it like I did it, but literally).
Four and a half minutes, and no more intermittent failures, because my version was built on back pressure to throttle requests under high server load, and total outbound requests around 1/8 of the original.
- godelski 1y agoThis just kinda made me think, are there less war stories being shared on HN? It sure feels like it. But what got me thinking is how sharing these types of war stories is an effective way to teach and share with one another. Maybe it's just my bubble, but I feel like I hear them infrequent. Anyways, this was a good one. Thanks for sharing.