Flash is fallible. But you'd rather have an AFA than spinning rust
A touch of the SSD magnetic
We tend to think of flash as a solid-state disk – like spinning rust, only more expensive, consuming less power, and much, much faster. And yes, it is true that you can use it like that, but there is a lot more that flash can offer if you start to take into consideration what makes flash different in the first place.
Simply put, flash and magnetic disk can both be used as non-volatile data storage, but in some ways that is where the resemblance ends. They work in completely different ways, are based on two very different technologies (magnetic and solid state) and behave quite differently under varying workloads.
Perhaps the biggest difference though is that if you want a particular bit off a hard disk, you must wait for that sector to rotate under the read head, and then you can only read data as fast as the head can grab it off the moving disk; with flash, you can pretty much access any bit you want instantly. This is the key to flash's performance advantage: super-fast latency, so no waiting about for your data. For transactional applications and many others, that is ideal.
Of course, flash isn't perfect. Most notably, a flash cell can only be reliably rewritten a certain number of times before it wears out, although flash controllers minimise this problem by distributing writes evenly in a process called wear levelling. Flash devices now regularly are capable of writing petabytes of information during their lifetime.
In addition, some flash types are more robust than others, and of course researchers are constantly working to improve this write endurance. Another issue is that the need to erase an entire block before rewriting a cell can lead to an undesirable phenomenon called write amplification, where the work of wear levelling and garbage collection (removing stale data) can involve the same data being rewritten several times as it is moved around.
As a result, magnetic disk can still be a better option for some applications, for example writing and rewriting lots of small elements such as log files. Flash also remains more expensive, especially for the enterprise-grade and less-dense versions that have better endurance, so mature technologies such as optical disk and magnetic tape have the cost advantage in areas such as deep archiving.