As many of you know, what started 20 years ago as a hacky gimmick for WorldFlight accidentally became the mainstay ACARS transport backhaul for the flight sim community. Now the USA is rolling out CPDLC (Europe has had it for a few years) many people are interested in going text. Ironically when I introduced CPDLC 15 years ago, everybody was fighting to move from chat mode ATC to voice mode (RogerWilco!) and people thought I was crazy. Har har.
Several external add-on providers (for MSFS and friends, not PSX) have now integrated an ACARS and CPDLC client into their offerings, and this leads to an explosive growth of users. I currently have over 13000 active users on this system. Today it exceeded 700 connections at the same time.
Having been developed 20 years ago for essentially five aircraft, this went surprisingly well.
But I started getting emails from people who experience intermittent connectivity. That is no real issue (hey, the real world ACARS also has traffic jams all over the place, and VHF isn't that robust) but it "should" not happen.
After some searching I found out what the problem was: I had set the keepalive to one second, assuming that I would not get more than about 50 single pings per second. But I get more, as many ACARS users ping the server significantly more often than once a minute, which is what I had programmed in the beginning. In Twitter times, people want /instant/ ACARS, all reality be damned. So my server was spending most of its time waiting for those one second keepalives, which burns little CPU so I did not notice what was going on. A large backlog of connection attempts built up and people had to wait in line for many seconds before they got their one second of fame.
Once I switched the complete keepalive off, thereby immediately disconnecting the client connection and opening the window for the next client, the load literally collapsed and it's now not 70, but 10 connections at the same time.
Of course at the expense of actually burning CPU. Now around 70%.
I will have to see what happens when the whole herd comes back during rush hour.
At least I now know that finally after 20 years the user base is significant :-D
Hoppie