xDB Session Info and MongoDB Availability
What happens to session information about an xDB Contact if MongoDB is unavailable when the session end event fires and Sitecore attempts to flush it to the collections database?
That is a great question, and one a client asked me earlier this week. Since we always recommend highly-available solutions to our clients, including MongoDB replica sets, it's an edge case we haven't encountered and honestly, one I hadn't considered.
After about five minutes of unfruitful googling, I figured I'd reach out to the Queen of Sitecore Documentation herself, Martina Welander (who recently wrote a FANTASTIC article on session state, by the way!).

Naturally, she delivered! By reaching out to the product team, she received this response from Akinori Taira:
In the event that the collections database is unavailable, there is a special 'Submit Queue' mechanism that flushes captured data to the local hard drive (the 'Data\Submit Queue' folder by default). When the collections database comes back online, a background worker process submits the data from the 'Submit Queue' on disk.
As with most everything else in Sitecore, this mechanism is controlled by entries, scattered across a few config files.
In Sitecore 8.0 (and its updates) there is a setting called Analytics.FailOnDatabaseErrors in Sitecore.Analytics.config:
However, in Sitecore 8.1+, the property Analytics.UseSubmitQueue is used from Sitecore.Analytics.Tracking.config:
Finally, from the Sitecore.Analytics.Tracking.config and Sitecore.Analytics.Tracking.Database.config, you get the following:
60
I have not tested this failover scenario myself yet, so your mileage may vary, but feel free to comment if you have and how well it works.
Happy Sitecore trails, my friends!