If the collections database is unavailable, analytics data for a user's session will still be collected and stored in Session. The problem comes when the session times out and Sitecore attempts to flush that data from Session to the collections database.
From Akinori Taira, part of the xDB product team:
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:
<!-- ANALYTICS FAIL ON DATABASE ERRORS
Note: This is a diagnostics setting that should not be enabled on a live system.
If set to true, web pages crash and show exception details in case
an operation cannot access the database.
If set to false, exceptions are suppressed and logged, and visit data
is queued until the database is back up. See <submitQueue> section.
<setting name="Analytics.FailOnDatabaseErrors" value="false" />
However, in Sitecore 8.1+, the property Analytics.UseSubmitQueue is used from Sitecore.Analytics.Tracking.config:
<!-- ANALYTICS USE SUBMIT QUEUE
Specifies if the submit queue should be used when the contact or session submit operations cannot access the database.
If set to true, the contact or session is queued until the database is backed up (see the <submitQueue> section).
<setting name="Analytics.UseSubmitQueue" value="true" />
Finally, from the Sitecore.Analytics.Tracking.config and Sitecore.Analytics.Tracking.Database.config, you get the following:
<queue type="Sitecore.Analytics.Data.DataAccess.SubmitQueue.FileSubmitQueue, Sitecore.Analytics" singleInstance="true" />
<backgroundService type="Sitecore.Analytics.SubmitQueueService, Sitecore.Analytics">
<!-- Service wakeup interval in seconds. -->
I have not tested this failover scenario myself yet, so your mileage may vary.