I think it is very important as an engineer to fail. I believe it is one of the best ways to get down and dirty and really exercise your problem solving skills. In the age of AI, getting a reasonably good outcome without much problem solving is becoming increasingly common. I believe the engineers who will stand out are the ones who have failed enough times to know how to make good decisions and reason their way through difficult problems.
That is why I am going to be sharing one of my biggest failures today.
the failure
Earlier this year, I worked at Kyron Medical, a health tech startup bringing AI voice agents to medical practices. I joined the team tasked with leading our EHR (electronic health record) integrations. My job was to connect our app and its various services to new EHR systems, allowing us to do things like retrieve patient records, book appointments, and more.
Later on, I was put in charge of one of our newest and most promising products, our AI voice receptionist. This involved building voice agents capable of doing things like booking appointments for patients and providing requested information. I was working across the entire tech stack for this project, including the EHR integrations.
One of the enhancements I shipped was designed to retrieve as many available appointment slots as possible in a single session. This way, when presenting availability to a patient, our agent could list dates and times back to back without having to wait for another API call in the middle of the conversation.
Essentially, while the agent was speaking to a patient about something like their name or insurance information, the backend would rapidly make multiple API calls to build an internal list of available appointment dates and times.
When I tested this solution, it worked great. The overall call experience was much smoother and more human-like than before. Satisfied with my work, I pushed it to prod (at like 2 AM lol) and went to bed.
The next day, I had a big midterm for my computer architecture class (shoutout Purdue ECE 437), so I turned off my notifications for the whole day.
I would later learn that this was a big mistake.
When I finally logged back in after my exam, I was flooded with messages and missed Slack calls. Upon reading them, I learned that our biggest client had turned off our voice receptionist for the day.
Here's what happened.
When I pushed the rapid API calling enhancement, I had tested it on both my local machine and the production servers. However, in both cases, I was the only person "calling" the agent.
When patients started calling our client the next morning, around 8 AM, we suddenly had multiple people trying to book appointments at the same time. With 10+ patients calling simultaneously, and each conversation triggering multiple rapid API requests, we hit the EHR's rate limit for its appointment fetching endpoint.
As a result, none of our client's patients could book appointments through our receptionist, and the service was eventually turned off for the day.
This was a huge oversight on my part, and my mistake had a much more far-reaching impact than I could have imagined.
Safe to say, my CEO was not happy with me.
I quickly went back in to limit the number of API requests allowed per call and added other guardrails to prevent the same issue from happening again. I also wrote a script to simulate multiple patients calling our receptionist simultaneously, so I could see how the fixes held up under load.
After testing everything, I pushed the fixes, and our client put the agent back up. It worked perfectly from that day onward.
However, one full day of outage is a big deal, and we had to work hard to regain the trust of the medical practice we were serving.
what i learned
I learned a lot from this experience, the first and foremost being to think through as many edge cases as possible and test extensively before pushing code.
While this was a lesson constantly emphasized in school, I somehow failed to consider what would happen when too many people tried to use the service at once. This is one of the most fundamental problems engineers have to think about when designing systems, yet I completely overlooked it.
In trying to ship code fast and fail fast, which I believe is a trait startups often strive for, I should have been much more careful in my execution. Moving quickly is important, but that doesn't mean skipping the work needed to make sure something is actually ready for production.
I also learned about the far-reaching effects that a seemingly simple bug can have, and how with more access comes way more responsibility.
One of my biggest gripes with working in corporate environments is the number of hoops you have to jump through to make even simple changes to prod. However, this experience showed me exactly why those checks exist. Having systems in place to review, test, and validate changes before deployment can prevent mistakes that end up affecting real people.
Lastly, I learned an important lesson about communication.
Had I kept my notifications on, I could have handled the problem much sooner, or at least delegated it to someone else if I was busy with my exam. I think one of the most overlooked aspects of engineering is the importance of soft skills and communication. This experience was a real eye-opener for me to be more aware and accountable, especially when I have committed myself to something.
At the end of the day, I think this is exactly why failure is so important. I could have learned about rate limits, concurrency, load testing, and production safeguards in a classroom, but actually experiencing the consequences of overlooking them taught me something that I won't forget anytime soon.
I hope whoever reads this had fun hearing about my failure, and hopefully learned something from it too!