Podcast
Questions and Answers
What is the main purpose of using Memcache in Facebook's architecture?
What is the main purpose of using Memcache in Facebook's architecture?
What is a major drawback of using Memcache?
What is a major drawback of using Memcache?
What challenge do startups face regarding scaling their web applications?
What challenge do startups face regarding scaling their web applications?
In 2009, how many MySQL servers did Facebook utilize?
In 2009, how many MySQL servers did Facebook utilize?
Signup and view all the answers
Which of the following is NOT a challenge in building a scalable web architecture?
Which of the following is NOT a challenge in building a scalable web architecture?
Signup and view all the answers
What does serverless computing primarily allow developers to avoid managing?
What does serverless computing primarily allow developers to avoid managing?
Signup and view all the answers
Which of the following is a benefit of using cloud database storage?
Which of the following is a benefit of using cloud database storage?
Signup and view all the answers
Which description best defines the characteristics of serverless computing?
Which description best defines the characteristics of serverless computing?
Signup and view all the answers
What kind of pricing model do cloud databases typically use?
What kind of pricing model do cloud databases typically use?
Signup and view all the answers
Which of the following is NOT a feature typically associated with cloud database storage?
Which of the following is NOT a feature typically associated with cloud database storage?
Signup and view all the answers
What is a key benefit of using scale-out architecture?
What is a key benefit of using scale-out architecture?
Signup and view all the answers
Which of the following best describes the function of DNS load balancing?
Which of the following best describes the function of DNS load balancing?
Signup and view all the answers
What challenge does scale-out architecture present?
What challenge does scale-out architecture present?
Signup and view all the answers
How does a load-balancing switch enhance web server performance?
How does a load-balancing switch enhance web server performance?
Signup and view all the answers
What is a characteristic of stateless servers in the context of load balancing?
What is a characteristic of stateless servers in the context of load balancing?
Signup and view all the answers
What defines scale-up architecture?
What defines scale-up architecture?
Signup and view all the answers
What role does load balancing serve in a server architecture?
What role does load balancing serve in a server architecture?
Signup and view all the answers
Which statement about nginx is accurate based on its description?
Which statement about nginx is accurate based on its description?
Signup and view all the answers
What is a primary advantage of using cloud computing for startups?
What is a primary advantage of using cloud computing for startups?
Signup and view all the answers
How does cloud computing typically bill users?
How does cloud computing typically bill users?
Signup and view all the answers
Which of the following statements about virtualization is accurate?
Which of the following statements about virtualization is accurate?
Signup and view all the answers
What is the role of a load balancer in a cloud computing setup?
What is the role of a load balancer in a cloud computing setup?
Signup and view all the answers
Which of the following is NOT a benefit of cloud computing?
Which of the following is NOT a benefit of cloud computing?
Signup and view all the answers
What does virtualization enable in the context of cloud computing?
What does virtualization enable in the context of cloud computing?
Signup and view all the answers
In the context of cloud computing, what are common metrics that providers bill users on?
In the context of cloud computing, what are common metrics that providers bill users on?
Signup and view all the answers
What is a possible drawback of managing a web app backend using virtual machines?
What is a possible drawback of managing a web app backend using virtual machines?
Signup and view all the answers
What is one of the main benefits of using load balancing in a web server environment?
What is one of the main benefits of using load balancing in a web server environment?
Signup and view all the answers
What is required for stateless servers to effectively handle load balancing?
What is required for stateless servers to effectively handle load balancing?
Signup and view all the answers
What is a common strategy to mitigate denial of service (DOS) attacks in web applications?
What is a common strategy to mitigate denial of service (DOS) attacks in web applications?
Signup and view all the answers
Which approach is employed to ensure a relational database can scale beyond a single instance?
Which approach is employed to ensure a relational database can scale beyond a single instance?
Signup and view all the answers
What is typically needed when dealing with session state in a load balanced environment?
What is typically needed when dealing with session state in a load balanced environment?
Signup and view all the answers
What type of attack involves an entity listening to a conversation to obtain confidential information?
What type of attack involves an entity listening to a conversation to obtain confidential information?
Signup and view all the answers
Which protocol does HTTP use to establish a secure channel?
Which protocol does HTTP use to establish a secure channel?
Signup and view all the answers
What does a public key certificate bind together?
What does a public key certificate bind together?
Signup and view all the answers
What role does the certificate authority play in public key infrastructure?
What role does the certificate authority play in public key infrastructure?
Signup and view all the answers
How is the session key created during an HTTPS connection setup?
How is the session key created during an HTTPS connection setup?
Signup and view all the answers
What TCP port is commonly used for HTTP traffic?
What TCP port is commonly used for HTTP traffic?
Signup and view all the answers
What happens if a browser detects that a certificate is expired?
What happens if a browser detects that a certificate is expired?
Signup and view all the answers
Which of the following is NOT a protection offered by HTTPS?
Which of the following is NOT a protection offered by HTTPS?
Signup and view all the answers
Study Notes
HTTP Security
- HTTP is a protocol for transferring web pages
- HTTPS is a secure version of HTTP
- HTTPS uses SSL/TLS to encrypt data and authenticate the website
- HTTP uses port 80 and HTTPS uses port 443
HTTP Threat Model
- Eavesdropper: listens to conversations (confidentiality)
- Man-in-the-middle: modifies content (integrity)
- Impersonation: pretends to be a different website
- Bogus website: (authentication, confidentiality)
HTTPS: Securing HTTP
- HTTPS sits on top of the SSL/TLS secure channel
- HTTPS (using https://) versus HTTP (using http://) -Different TCP ports (TCP port 443 for HTTPS, TCP port 80 for HTTP)
- All HTTP bytes are encrypted and authenticated using HTTPS
- No change to HTTP itself, just the communication channel
Public Key Infrastructure
- Public key certificates bind identity (e.g., domain name example.com) with a public key.
- Digital signatures ensure integrity.
- Certificate authorities (e.g., GoDaddy) issue public key certificates and verify identities.
- Preconfigured certificates are in web browsers.
Enabling HTTPS for a Server
- Web Hosting Providers may offer HTTPS security.
- You can request and install an SSL/TLS certificate from a Certificate Authority.
- SSL/TLS certificates need periodic renewal.
HTTP vs. HTTPS
- HTTP sends data in plain text, allowing hackers to see login credentials and passwords
- HTTPS sends sensitive data encrypted, making it hard to read for a hacker
- Data sent with HTTPS looks different to the hacker (abErgdy#uwitWLqxytllqp), different from HTTP ([email protected])
Website Access Requested
- A browser requests access to a website.
- The browser sends a request to the Web Server.
- An SSL/TLS certificate is sent from the server.
Browser Validates SSL/TLS Certificate
- The browser checks if the certificate is valid, not expired, and matches the domain name.
- Checks if the certificate is issued by a trusted certificate authority.
Establishing a Secure Connection
- Browser generates a "pre-master secret," encrypts it with the server's public key.
- The server uses its private key to decrypt the pre-master secret.
- A session key is created from the pre-master secret (symmetric encryption)
Large-Scale Web Applications
- Web application architecture involves web browsers, web servers and storage system
- Web servers/application servers handle incoming requests.
- Storage systems (databases-e.g., MySQL, mongoDB) hold data and serve requests (i.e., SQL or NoSQL requests).
Scale-Up vs. Scale-Out
- Scale-up involves increasing the resources of a single server (increasing the capacity of a single server).
- Scale-out involves adding more servers to handle increasing load (increasing the number of servers to proportionally increase capacity).
Load Balancing
- Distribute HTTP requests across multiple front-end web servers using load balancers.
- Front-end machine accepts initial connections then redirects them to back-end machines (using algorithms)
- DNS (Domain Name System) load balancing - Handles distributing requests across geographically distributed systems.
- DNS servers dynamically rotate among these targets.
- Load-balancing switch (Layer 4-7 switch) directs incoming packets and connections to appropriate web servers.
- Stateless servers simplify load balancing.
Nginx (“Engine X”)
- Efficient web server handling thousands of HTTP connections.
- Load balancing - Forward requests to front-end servers.
- Fault tolerance - Handles failures of front-end servers.
- Handles simple requests (static files).
Scale-out Architecture (assumptions)
- Stateless servers: Different requests from the same user are handled by different servers.
- What about session state? Accessed on every request, require specialized handling. (e.g., memcache)
- WebSockets connect browsers and servers, making load balancing challenging.
Scale-out Storage
- Traditional web applications use relational databases.
- Single database instances don't scale well.
- Data sharding spreads data across multiple instances.
- Data replication creates backups and handles failures.
- Applications must partition data effectively.
Memcache
- Main-memory caching system.
- Caches results of recent database queries.
- Faster access compared to databases (500 microseconds vs tens of milliseconds).
- Widely used in applications like Facebook (over 200,000 memcache servers).
Cloud Computing
- Cloud computing dynamically allocates and provisions servers.
- The cloud provider manages infrastructure and capacity.
- Pay-as-you-go model (pay for resources used).
- Suitable for start-ups and scaling needs of organizations.
- Virtualization (key concept for accessing servers remotely).
Cloud Computing Pros/Cons
- Pros: Pay-per-use, flexible scaling, lower upfront costs, access to vast resources, many APIs (Application Programming Interfaces)
- Cons: Internet dependency, security considerations, vendor lock-in, lack of control
Higher Level Interfaces
- Managing virtual machines requires substantial skills.
- Higher-level interfaces like container systems (Docker/Kubernetes) shield developers from complexities of OS management.
- Manage storage using cloud databases (handling storage and data).
- Serverless architectures delegate server management to the cloud provider.
Cloud Database Storage
- Cloud-based database services rather than running instances.
- High availability, consistency and performance are essential features.
- Use queries to define schema, access required data.
- Pay for usage, based on data access.
Serverless Computing
- Cloud provider dynamically manages server allocation.
- Hidden server management and capacity planning from the developer.
- Developers focus on providing code - functions that run in response to events.
Serverless Architecture
- Code execution based events/URLs (like web servers - HTTP).
- Serverless-specific platforms (e.g., Amazon Lambda).
- Manage scaling and reliability through the platform.
Content Delivery Networks (CDN)
- Distribute web app assets efficiently across multiple servers.
- Fast asset delivery with closer servers to end-users.
- Reduces load on the main web servers.
- Works well with static content.
Cloud Computing & Web Apps
- Pay-as-you-go model supports scalability.
- Useful infrastructure services (auto-scaling, monitoring, fault handling).
- Cloud APIs offer analytical, machine learning and other tools.
Discussion (When to Build In-house Data Center Instead of Cloud)
- High consistent demand
- Strict security requirements
- Latency concerns /Performance
- Customization, specialized hardware needs
- Long-term growth and resources needs
- High data transfer costs / large data volumes
- Compliance needs and disaster recovery
- Financial viability and long-term commitment
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz covers the fundamentals of HTTP and HTTPS, including their differences, security protocols such as SSL/TLS, and the threat models associated with web communications. Test your knowledge on how these protocols protect data integrity and confidentiality against various security threats.