I'm wondering how you're supposed to manage a failure from your web hosting provider (server breakdown, ddos attack, server maintenance...) For instance, is it possible to host your website on multiple servers? I'm currently using shared hosting with OVH, but it has already been down multiple times, and since I'm quite dependant on my website, I'd like to know what the good practices are to avoid a "single point a failure".
Most large sites run on a set of servers behind a load balancer. This allows some of the servers to go down (or be taken down for maintenance) without taking the whole site down.
The load balancer is still a single point of failure, but load balancers generally have 99.99% uptime. They are single purpose machines tested against very high loads.
Failover DNS monitors your primary server (or cluster behind a load balancer). When it detects a failure it points DNS to a separate backup site running in a different location.
Content delivery networks
CDNs act as distributed caching proxy servers for your website. They handle requests to your website via "edge nodes" located around the world. Each node will have to request the resource from your "origin" server on the first request and again periodically to pick up changes. CDNs help buffer against some types of DDOS attacks as well as reduce load on your origin server.
Whatever solutions you have in place, you need to get alerts when your website does go down. This will allow you to jump in and fix issues.
Releasing new versions of your website can occasionally be problematic. It helps to maintain a staging environment where new versions can run for a while before a live release. You would typically want to do both manual and automated tests against your staging environment.
Sites that use a database will typically want to have a live database and a second backup database ready to go at each hosting location. This is usually accomplished by synchronizing databases by serializing all database transactions and replaying them to each database.
Sharding is a technique of having different data live on different servers based on a hash of data key. In a robust sharding environment, data typically gets written to at least two locations for redundancy. Unlike database synchronization, not all servers have to have a copy of all of the data which allows sharding to more easily handle large data sets (terrabytes) that don't fit well in traditional relational databases.
Cloud hosting providers such as Amazon AWS typically offer all of these services. AWS even has Elastic Beanstalk technology that will add and remove servers automatically based on server load.