Multipathing is a technique that enables usage of more than one physical path to transfer data between a host and an external storage device. This is shown in Figure 5.5. In case of a failure of any element in the network—such as an adapter, switch, or cable—the network can switch to another physical path and avoid the failed component. This ensures uninter- ruptable, correct, and complete transfers with minimum failures.
Cloud computing relies on data and therefore large amounts of storage. Cloud computing providers often have large storage area networks with a massive number of storage servers.
And there is a requirement that all users be able to access such resources quickly and consis- tently, so failover protection and redundancy are very important.
With data growing exponentially, especially with entertainment media going digital and high-definition videos becoming the norm, video streaming providers need powerful network interfaces to their storage in order to provide files quickly. Multipathing is an effective way of increasing the available bandwidth to Internet Small Computer System Interface (iSCSI) networks, much like bonding does for normal networks. In multipathing, multiple physical paths are used between hosts and data storage devices in case there is any link failure in the SAN network such as ones caused by faulty NICs, switch, or cables. The software can simply switch to another physical path, which circumvents the failed components. This is known as path failover.
F I G U R E 5 . 5 A simple representation of the multipathing concept
Routers Data stores
Source machine
Load Balancing
Cloud computing services are used by thousands of users at once, enterprise customers as well as individual users. But the promise of virtually unlimited resources is still largely a fan- tasy, the ideal scenario. The truth is that resources are very, very finite and being shared by hundreds of thousands of people. The reason that everything—every server, every switch—
doesn’t just stop working that some ingenious resource management methods are used. Load balancing is one of these methods. A load balancer, usually just another server, assigns con- nections and requests to different servers, making sure that not one server is overloaded. This is essential in making things run smoothly.
Scaling: Vertical vs. Horizontal vs. Diagonal
Scalability is often one of the main aspects and reasons that companies are moving their infrastructures to the cloud. It makes sense because it is easier to scale and expand in a virtual environment when the number of servers you can deploy is no longer limited by the size of
Performance Concepts 139
your racks or the size of your data center space or even your budget. Moving to virtual from physical makes a lot of economic sense, but it also makes sense from a design and development standpoint when considering infrastructure architecture. With the cloud, a moderate-sized organization is able to build a scalable infrastructure that would have otherwise been way beyond its means. Different types of scaling are described below and shown in Figure 5.6.
Vertical Scaling Vertical scaling is the process of vertical growth; everything is grown bigger and faster, or simply more of something is added. In this case, adding more CPU cores or faster ones allows for faster processing, especially with batch jobs. Adding more memory allows for growing the cache and prefetching data, which further speeds up opera- tions. Adding more disks and storage facilities helps with data retention, and faster disks with faster I/O time and fast seek and access times help with performance as well. Basically, vertical scaling means to grow bigger and go faster; it allows us to speed up individual appli- cations. However, there are limits to this kind of scaling. Growth can cause diminishing returns, and there will come a time when adding more provides no more performance ben- efit, so we must find other ways of scaling and increasing throughput.
Horizontal Scaling Horizontal scaling is sideways growth, so instead of creating faster and stronger infrastructure points, you are adding more infrastructure points. If increasing the processing powers of servers becomes cost prohibitive and the performance gains are no longer attractive enough to justify the costs, you can increase the number of servers. For example, you could take a web server that can serve 100 users at once and grow it vertically so that it will serve users faster, leading to better satisfaction and retention, but the fact still remains that only 100 people are being served. But by scaling horizontally, you add more servers. By adding another server, even one not as upgraded and beefed up as the first one, you can now serve 200 customers. That is actually doubling the throughput. It gives you the power to execute more concurrent workloads at the expense of added complexity because now you have to worry about two servers and 200 customers, but that could only be good for business.
Diagonal Scaling Diagonal scaling is the combination of both vertical and horizontal scal- ing, and it is the result when both growth directions have already been taken. For example, if you have maxed out the performance upgrades to your server, then you can start multiplying your servers using the same specs and growing horizontally.
There has always been a debate about which type of scaling is best. Do you make your infrastructure more powerful to serve customers faster and have them finish quicker so that you accommodate more customers? Or do you scale horizontally with more servers to serve more customers even if it takes a bit longer for them to finish with their transactions?
Both horizontal and vertical scaling have their respective pros and cons and associ- ated costs as well. It is like the hardware conundrum, where you cannot decide between buying the most powerful $10K machine or buying 10 slow machines at $1K each or whether to take the middle ground and buy four midrange machines at $2.5K each. The answer to that will depend entirely on your priorities and objectives and the types of applications being run.
F I G U R E 5 . 6 Types of scaling
Vertical scaling Diagonal scaling
Original Horizontal scaling
Disk Performance
The disk is currently the storage medium of choice for most enterprises and users because of its relatively cheap price, passable performance, and large capacity. But despite major leaps in capacity technology, disk performance is currently not where we want it to be, or where it should ideally be. This is because of the inherent limitations of mechanical moving parts.
Mechanical parts simply cannot keep up with the performance of electronics. That is why solid-state drives are beginning to take over the market, but the technology is still new and it has a long way to go. So for now, we are stuck with the disk.
Since we are stuck with the disk, we might as well make the best of it and keep it per- forming at its peak. There are two categories associated with disk performance: access time and data transfer rate.