Way, way back in pre-history, back when dinosaurs walked the Earth and we were mere gleams in the eyes of furry critters whose usual fate was to go crunch, harvester ants had worked out how many foragers to send out of the nest to bring home the Jurassic bacon using techniques we now use on the Internet.
This is not an Onion story. As reported by Standford University, two researchers, Deborah Gordon, a biology professor told Balaji Prabhakar, a computer science professor, about how harvester ants (Pogonomyrmex barbatus) worked out how to send out ants to collect food. Prabhakar soon realized, to his surprise, that the ants were using almost the exact same TCP (Transmission Control Protocol) algorithm that we use on the Internet
When the ants hunt for food, an ant won't return to the nest until it's found something. If there's a lot of food, usually seeds, available, they'll bring the goods back to the next. Then, more ants will join them and the food will get marched back to the nest at a quicker pace. As the food supply runs low, the nest will start sending out fewer foragers.
If you think of food as data bandwidth and work out an algorithm to predict their foraging behavior, you'll soon discover that the ants were using TCP Congestion Control long before we've worked out how to start fire reliably never mind IPv6. The ants begin by using "slow start" to see how much food is available. Then, as the amount of food/potential bandwidth is scoped out a large wave of ants, or packets, are sent out to collect the dinner/data.
Say, however, a bird finds the ants and starts picking them off. As the nest receives fewer ants or more TCP time-outs, latency increases. If no ants return after 20-minutes, the nest will break off the transmission, that is, it will cease sending out any more ants.
According to Prabhakar, "had this discovery been made in the 1970s, before TCP was written, harvester ants very well could have influenced the design of the Internet." True. While we don't even think about it today, working out how TCP and Ethernet should deal with congestion took years to work out. Even now, as anyone who's ever tried to use Wi-Fi, 3G or 4G in an area with too many users and not enough access points knows, data congestion can be a serious pain-in-the-neck.
Who knows. Gordon speculated, "Ants have evolved ways of doing things that we haven't thought up, but could apply in computer systems. Computationally speaking, each ant has limited capabilities, but the collective can perform complex tasks. So ant algorithms have to be simple, distributed and scalable – the very qualities that we need in large engineered distributed systems. I think as we start understanding more about how species of ants regulate their behavior, we'll find many more useful applications for network algorithms."