Chapter 4: Distributed Systems in Context Flashcards
1
Q
Why does DNS work?
A
-
Hierarchical, federated system
- Delegation of requests
- Distributed world-wide
-
Caching at multiple levels
- Trusting cached result through signatures
- Based on UDP
2
Q
DNS Attacks? How to mitigate?
A
- Type of denial-of-service attack
- Attackers use EDNS0, an extension of the DNS protocol
- http://www.rfc-editor.org/rfc/rfc2671.txt
- In certain cases a 36 byte long requests can trigger a 3000 bytes long reply => amplification of ~100x
- Last attack March 19, 2013 Spamhaus
- 75Gbps DDOS
- Mitigated by load balancing requests
- http://blog.cloudflare.com/the-ddos-that-knocked- spamhaus-offline-and-ho
Mirigation:
- DNSSEC – DNS security extensions
- Resource records digitally signed
- Recursive resolver validates data integrity and origin authentication
- Deployed in 2010, not everywhere available
3
Q
What are key-value stores?
A
- Container for key-value pairs
- Distributed multi-component systems
- Category of NOSQL-databases (not only SQL)
- Databases that break with philosophy of traditional (relational) DBMS to overcome their idiosyncrasies (weaknesses ?)
4
Q
Key value store compared to DBMS - SQL
A
DBMS
- Relational data schema
- Normalized data model
- Datatypes
- Relationsbetween tables (e.g., foreign key)
- Row-orientation
KVS
- No data scheme or modifiable data schema
- De-normalizedmodel
- Raw byte access
- No relations
- Column-orientation
- Distributed data
5
Q
Why are key-value stores needed?
A
- Today’s internet applications
- Huge amounts of stored data (PB (1015 bytes)+)
- Huge number of users (e.g., 1.11 billion)
- Frequent updates
- Fast retrieval of information
- Rapidly changing data definitions
- Ever more users, ever more data
-
Incremental scalability
- User growth, traffic patterns
- Adapt to number of requests & data size
-
Flexibility
- Adapt to changing data definitions
-
Reliability
- Thousands of components at play
- Provide recovery in presence of failure
-
Availability
- Users are worldwide
- Guarantee fast access
6
Q
Key-Value store client interface
A
- Main operations
- Write/update - put(key, value)
- Read - get(key)
- Delete - delete(key)
- Usually no aggregation, no table joins
7
Q
Common features of key-value stores
A
- Flexible data model
- Horizontal partitioning
- Store big chunks of data as raw bytes
- Fast column-oriented access
- Memory store & write ahead log (WAL)
- Keep data in memory for fast access ( Bath / Fasw had access)
- Keep a commit log as ground truth ( Basis )
-
Versioning
- Store different versions of data
-
Replication
- Store multiple copies of data
- Failure detection & failure recovery
8
Q
Common non-features
A
- Integrity constraints
- Transactional guarantees, i.e., ACID
- Powerful query languages
- Materialized views
9
Q
Bigtable components
A
- Client library
-
Master
- Metadata operations
- Load balancing
-
Tablet server
- Data operations (read / write)
10
Q
Master
A
- Assigns tablets to tablet servers
- Detects addition and expiration of tablet servers
- Balance tablet server load
- Etc.
11
Q
Tablet server
A
- Manages a set of tablets (up to a thousand)
- Handles read and write requests for the tablets it manages
- Splits tablets that have grown too large
12
Q
Bigtable building blocks
A
-
Chubby
- Metadata storage
-
GFS (Google file system)
- Data log, storage
- Repiclation
-
Scheduler
- Monitoring
- Failover
13
Q
Chubby “& ZooKeeper lock service
A
- Highly-available, persistent, distributed lock service
- Use in Bigtable
- Ensure at most one active master at any time
- Store bootstrap location of data (root tablet)
- Discover tablet servers (manage their lifetime)
- Store schema information
14
Q
Representation & use of configuration information with lock service
A
Managed via directories, small files Directories, files can serve as locks Reads, writes are atomic.
Clients maintain sessions If session lease expires and can’t be renewed, locks are released.
15
Q
Lock service in context
A
-
Comprised of five active replicas
- Consistently replicate writes
-
One replica is designated as master
- We need to elect the master (leader)
-
Service is life when:
- majority of replicas are running and
- can communicate with one another
- A quorum needs to be established