Search code examples
load-balancingamazon-elbaws-application-load-balancer

Application load balancer vs network load balancer


I am new to AWS. I can't get a clear idea behind ALB vs NLB. Could anyone explain in a simple way?


Solution

  • There are some excellent answers out there already, let me pick out some key points that may help.

    Network Load Balancer

    As the name implies, this is for the network levels only. Typically layer 4. It does not care, nor see, about anything regarding the application layer, such as cookies, headers, etc.

    It is context-less, caring only about the network-layer information contained within the packets it is directing this way and that.

    the 'balancing' done here is done so solely with IP addresses, port numbers, and other network variables.

    Application Load Balancer

    This takes into account multiple variables, from the application to the network. It can route its traffic based on this.

    It is context-aware and can direct requests based on any single variable as easily as it can a combination of variables.

    Key Differences

    The network load balancer just forward requests whereas the application load balancer examines the contents of the HTTP request header to determine where to route the request

    Network load balancing cannot assure availability of the application, where as Application load balancing can.

    Some good sources from where I extracted this information are:

    https://medium.com/awesome-cloud/aws-difference-between-application-load-balancer-and-network-load-balancer-cb8b6cd296a4

    https://linuxacademy.com/community/show/22677-application-load-balancer-vs-network-load-balancer/

    https://aws.amazon.com/elasticloadbalancing/features/#compare