On a whiteboard, design a three server web infrastructure that hosts the website www.foobar.com. Requirements: You must add: 2 servers 1 web server (Nginx) 1 application server 1 load-balancer (HAproxy) 1 set of application files (your code base) 1 database (MySQL) You must be able to explain some specifics about this infrastructure: For every additional element, why you are adding it What distribution algorithm your load balancer is configured with and how it works Is your load-balancer enabling an Active-Active or Active-Passive setup, explain the difference between both How a database Primary-Replica (Master-Slave) cluster works What is the difference between the Primary node and the Replica node in regard to the application You must be able to explain what the issues are with this infrastructure: Where are SPOF Security issues (no firewall, no HTTPS) No monitoring Please, remember that everything must be written in English to further your technical ability in a variety of settings.
Question
On a whiteboard, design a three server web infrastructure that hosts the website www.foobar.com.
Requirements:
You must add: 2 servers 1 web server (Nginx) 1 application server 1 load-balancer (HAproxy) 1 set of application files (your code base) 1 database (MySQL) You must be able to explain some specifics about this infrastructure: For every additional element, why you are adding it What distribution algorithm your load balancer is configured with and how it works Is your load-balancer enabling an Active-Active or Active-Passive setup, explain the difference between both How a database Primary-Replica (Master-Slave) cluster works What is the difference between the Primary node and the Replica node in regard to the application You must be able to explain what the issues are with this infrastructure: Where are SPOF Security issues (no firewall, no HTTPS) No monitoring Please, remember that everything must be written in English to further your technical ability in a variety of settings.
Solution
Step 1: Designing the Infrastructure
First, let's draw the three servers on the whiteboard.
-
Server 1: This is our web server where we will install Nginx. Nginx is a popular open-source web server that is known for its high performance and stability. It will be responsible for serving static content and forwarding dynamic content requests to the application server.
-
Server 2: This is our application server where our application files (code base) will reside. The application server is responsible for running our application logic and interacting with the database.
-
Server 3: This is our database server where we will install MySQL. MySQL is a widely used open-source relational database management system. It will store and manage all the data needed by our application.
In front of these servers, we will place a load balancer (HAproxy). The load balancer is responsible for distributing incoming network traffic across the servers to ensure no single server becomes overwhelmed with too much traffic. This helps to increase the availability and reliability of our application.
Step 2: Explaining the Specifics
-
Load Balancer: We are adding a load balancer to distribute the load among our servers and prevent any single server from becoming a bottleneck. We can configure our load balancer with a round-robin distribution algorithm, which works by distributing client requests evenly across all servers in the pool.
-
Active-Active vs Active-Passive: In an Active-Active setup, all servers are running and handling traffic. In an Active-Passive setup, one server is active and handling traffic, while the other is a standby server that only becomes active if the primary server fails. Our load balancer is enabling an Active-Active setup to maximize resource utilization.
-
Database Primary-Replica (Master-Slave) Cluster: In this setup, the primary node (master) handles all write operations and propagates the changes to the replica nodes (slaves). The replica nodes can handle read operations. This setup helps to distribute the database load and increase data availability.
-
Primary Node vs Replica Node: The primary node is responsible for handling write operations, while the replica node is responsible for handling read operations. From the application's perspective, it can write data to the primary node and read data from either the primary or replica nodes.
Step 3: Identifying the Issues
-
Single Point of Failure (SPOF): If any of our servers (web, application, or database) or the load balancer fails, it could cause our entire application to become unavailable.
-
Security Issues: Without a firewall, our servers are exposed to potential attacks. Without HTTPS, the data transmitted between our servers and clients is not encrypted and could be intercepted.
-
No Monitoring: Without a monitoring system in place, we won't be able to detect issues or anomalies in our infrastructure in a timely manner.
Similar Questions
Imagine that you work for the motor-vehicle department of a governmental organization. The department runs several public websites that allow drivers to register their vehicles and renew their driver's licenses online.The vehicle-registration website has been running on a single server and has suffered multiple outages because of server failures. This results in frustrated drivers trying to register their vehicles by month's end before their registrations expire.The department would like to improve resiliency by adding multiple web servers to its site and distributing the load across them. They would also like to centralize their site on a single load-balancing service to simplify the URLs for site visitors.You need an Azure subscription to complete the exercises. If you don't have an Azure subscription, create a free account and add a subscription before you begin. If you're a student, you can take advantage of the Azure for students offer.Learning objectivesIn this module, you'll:Identify the load-balancing capabilities of Application Gateway.Create an Application Gateway and configure load balancing.Configure an Application Gateway to use URL path-based routing.PrerequisitesKnowledge of basic networking conceptsFamiliarity with Azure virtual machines and Azure App ServiceFamiliarity with Azure virtual networking
Which option would you choose if you required cross-regional load balancing for a web application?SSL Proxy Load BalancingInternal HTTP(S) Load BalancingHTTP(S) Load BalancingTCP Proxy Load Balancing
Which option would you choose if you required cross-regional load balancing for a web application?Internal HTTP(S) Load BalancingSSL Proxy Load BalancingTCP Proxy Load BalancingHTTP(S) Load Balancing
Which of the following server types would benefit MOST from the use of a load balancer?DNS serverFile serverDHCP serverWeb server
You are designing a high availability solution for a business-critical web app that will be deployed to multiple Azure regions.You need to recommend a high availability solution that meets the following requirements:Provides users a single hostname to access the web app.Load balances HTTP traffic across regions.Route users to the web app instance that has the lowest latency.Which high availability solutions should you recommend?Select only one answer.Azure Application GatewayAzure Front DoorAzure Load BalancerAzure Traffic Manager
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.