Part 3. Storing data in the cloud

Suppose there’s a guy named Singleton in your office who knows all about the file server. If Singleton is out of the office, no one else can maintain the file server. When Singleton goes on vacation, the file server crashes—no one knows where the backup is located, and the boss needs the document now or the company will lose a lot of money. If Singleton had stored his knowledge in a database, coworkers could look up the information. But because the knowledge and Singleton are tidily coupled, the data is unavailable.

Now imagine a server with important files located on a hard disk. As long as the server is up and running, everything is fine. But things fail all the time—and so will the server, eventually. If a user uploads a document on your website, where is it stored? Chances are high that the document is persisted to hard disk on the server. Suppose the document is uploaded to your website but persisted as an object in an independent object store: if the server fails, the document is still available. If you need two servers to handle the load on your website, they both have access to that document because it isn’t coupled to a single server. If you separate your state from your server, your system can become fault-tolerant and elastic. Highly specialized solutions like object stores and databases can persist your state.

Chapter 7 introduces S3, a service offering object storage. You’ll learn how to integrate the object store into your applications to implement a stateless server. Chapter 8 discusses block-level storage for virtual servers offered by AWS and how to operate legacy software on block-level storage. Chapter 9 introduces RDS, a service offering you managed relational database systems like PostgreSQL, MySQL, Oracle, and Microsoft SQL server. If your applications use such a relational database system, this is an easy way to implement a stateless server architecture. Chapter 10 introduces DynamoDB, a service that offers a NoSQL database; you can integrate this NoSQL database into your applications to implement a stateless server.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset