I started playing with websockets for the first time more than 5 years ago. I knew of them for a long time but never played with them. Websockets are the only bidirectional communications channel supported by the browser. Websockets proved amazing for live updates to a browser app, because otherwise you have to poll the server with repeated HTTP requests. So, I knew of websockets already in a very limited sense.
In my personal application I was still using HTTP for almost everything except communicating with the browser, up until last year. I knew a little (very little) of how network communications work in the lower level from my part time info sec job more than a decade ago, so I had the life experience to know I could go further and do more than the clumsiness of HTTP. I didn't really know much about the internals of how websockets work (or even sockets/streams in general). At that point I was using a popular Node library to do all the socket management.
I made the decision to write my own websocket library to meet the specific needs of my application directly as a Node TLS stream interface. This took me about a month to figure out and I required coaching from somebody that was good with binary. I managed to figure it. Switching from HTTP to a socket based communication architecture and managing all network traffic from a single point in my application reduced my test automation time from about 45 seconds to about 7.5 seconds. In the past month I learned to cycle through my socket message queue using an event oriented approach on message drain as opposed to as fast as possible in the code to further reduce that test automation time down to 6.22 seconds. I knew there was a potential for improved execution performance, but not by that much. The purpose was only to liberate the application from the round trips imposed by HTTP instead of a one-way fire and forget approach.
This required a large investment in time to revision my communications architecture and going through the trials (repeated failures) in running a socket library of my own written from scratch. But now my application manages application layer communications faster than anything I have seen in the corporate world in my nearly 20 years of corporate software experience. I have learned architecture through constant refactoring and attempts to impose simplicity (don't repeat yourself principle).