Grid Guides

Explore How System On Grid Can Work For You

Grid Guide Topics

5 Common Server Setups for your Web Application

Table Of Contents


    ## Table of Contents

    – [Introduction](#introduction
    – [Common Server Setups for your Web Application](#common-server-setups-for-your-web-application
    – [Everything on One Server](#everything-on-one-server
    – [Separate Database Server](#separate-database-server
    – [Load Balancer Reverse Proxy](#load-balancer-reverse-proxy
    – [Master Slave Database Replication](#master-slave-database-replication
    – [Database as a Service](#database-as-a-service
    – [Conclusion](#conclusion

    ## Introduction

    When you create any web application there are several factors to keep in mind.
    Those are

    ### Performance
    ### Scalability
    ### Reliability
    ### Cost
    ### Availability
    ### Ease of Management

    In addition to those factors, some essential configurations are required for your Web Application. Here are some Common Server setups which are essential to your web Application including their advantages and disadvantages.

    ## Common Server Setups for your Web Application

    ## Everything on One Server

    To run any web application all components needs to reside on a single system.
    In a modern web application, all these parts are needed to run this app like a web server, Database server, and application code.
    A standard setup of these components would be LAMP stack. Which means Linux, Apache, Mysql, and Python on a single server.

    When to use it?

    If you want to set up an application quickly, then just go for it because it is quite simple to set up.

    ## Advantages

    It is quite simple with only some clicks.

    ## Disadvantages

    Poor Performance because of resource contention. Not horizontally scalable.

    ## Separate Database Server

    Here Application server and Database server reside separately. So that we can remove the resource contention between the application server and database server because they don’t share the same resource. This makes capacity planning much easy and it gives fault tolerance in more advanced configurations.

    When to use it?

    It is easy for setting up an application and there will not occur any clash between an application server and database server from working on the same resource.

    ## Advantages

    Scalability is high due to the separation between the resources and Simple upgrade from single server setup.

    ## Disadvantages

    Cost is more when compared to a single server. It is complex than a single server. Network performance is poor.

    ## Load Balancer Reverse Proxy

    As the name itself depicts that, the load is balanced among the multiple resources by allowing them to serve a part of traffic. Load balancers can be added to the server to improve their Performance and Reliability by sharing the workload across the many servers. If one server gets fails to balance the load then other servers take care of the incoming traffic until the failure server gets back again. The load balancer also used to serve multiple applications through a single domain and port by using a reverse proxy.

    When to use?

    It is very much useful in the environment that requires scaling by adding more servers called horizontal scaling.

    ## Advantages

    Load balancing can enable horizontal scaling. It increases redundancy. Scalability is high due to additional servers to the pool.

    ## Disadvantages

    If the load balancer fails, then all traffic to the website get down immediately. So it is a single point of failure. Complexity is high.

    ## Master Slave Database Replication

    In Master-Slave database Replication there will be one Master and one or more Slave nodes. In this setup, all updates are sent to the Master node and reads can be distributed across all slave nodes.

    When to use it?

    It is good enough if you want to increase your read performance for the database application.

    ## Advantages

    It improves read performance by distributing read across the slaves. It can also improve write performance by using master for updates.

    ## Disadvantages

    If the master fails, no further updates can be performed on the database until the issue is resolved. It does not possess default remedy in case of any failure in Master node.

    ## Database as a Service

    Database as a service is a cloud computing service model that provides that provides users with some form of access to a database without setting up physical hardware or installing software. All the administrative tasks are taking care by service providers.

    When to use it?

    When you decide to outsource your database then the main factor you need to consider is “Can the DBaaS can do a better job providing database services then you can?”.Then you can build a database unique to your needs and a fill a warehouse with servers to run it.

    ## Advantages

    You need not to buy your own equipment or software licenses. You need not hire database developers. You need not build a database system. The database is offsite. It means a loss of power or natural disaster doesn’t affect the system. You need not pay the power bill for running all the servers.

    ## Disadvantages

    The main disadvantage of the database as a service is a matter of control. It means you are not having a direct access to the servers which are running your database. You don’t have direct influence over the physical safety of servers. If your system goes down, then you don’t have access to your database. There will be an issue of cost-at-scale. It means once a business reaches a specific size, it is better to build your database and run it.

    ## Conclusion

    For now, you have basic knowledge in the primary server set up and types of the server setup you would use in your applications. If you are working on improving your servers then an iterative process is better to avoid many problems quickly.