CS75 (Summer 2012) Lecture 9 Scalability Harvard Web Development David Malan

A common set of scalability principles that you need to know

  • Vertical scaling
    • when you run out of ram/processor/resources, what should you do?
      • buy more RAM/processors/resources
    • it's not a full solution, why?
      • exhaust financial resources or reach the state of the art and technology
  • Horizontal scaling : buy many slow but cheap machines instead of getting fewer fast and expensive machines
  • Caching
    • mysql query cache
      • add this to file my.CNF : query_cache_type = 1
      • slow the first time you execute a statement if you don't have an index or you have a really huge table
      • the next time you execute it and the query cache is on, the response is gonna back much more quickly
    • memcache : memory cache
      • stores whatevery you want in RAM
  • Load balancing

    • A load balancer is a device that acts as a reverse proxy and distributes network or application traffic across a number of servers. Load balancers are used to increase capacity (concurrent users) and reliability of applications.
  • Database replication

  • Database partitioning

RAID

  • RAID (redundant array of independent disks) is a data storage virtualization technology that combines multiple physical disk drive components into a single logical unit for the purposes of data redundancy, performance improvement, or both.
  • Data striping
    • data striping is the technique of segmenting logically sequential data, such as a file, so that consecutive segments are stored on different physical storage devices.
  • Parity: an error protection scheme called "parity", a widely used method in information technology to provide fault tolerance in a given set of data.
    • Most use simple XOR, but RAID 6 uses two separate parities based respectively on addition and multiplication in a particular Galois field or Reed–Solomon error correction.
  • Standard levels
    • RAID0: for performance
      • RAID 0 (also known as a stripe set or striped volume) splits ("stripes") data evenly across two or more disks, without parity information, redundancy, or fault tolerance.
      • RAID0
    • RAID1: two drives, one for redundancy
      • RAID 1 consists of an exact copy (or mirror) of a set of data on two or more disks;
      • a classic RAID 1 mirrored pair contains two disks.
      • This configuration offers no parity, striping, or spanning of disk space across multiple disks, since the data is mirrored on all disks belonging to the array, and the array can only be as big as the smallest member disk.
      • RAID1
    • RAID5: 3-5 drives, only one of them is used for redundancy
      • RAID 5 consists of block-level striping with distributed parity.
      • parity information is distributed among the drives. It requires that all drives but one be present to operate.
      • RAID5
    • RAID 6: any two of drives can fail

results matching ""

    No results matching ""