Layer7 API Management

Expand all | Collapse all

Configuring AWS Elastic Load Balancer as LB for API Gateway Cluster & API Portal

  • 1.  Configuring AWS Elastic Load Balancer as LB for API Gateway Cluster & API Portal

    Posted Oct 26, 2016 07:14 AM

    Hi CA Community,

     

    Would like to ask if there is example of guides on implementing AWS ELB as a LB for API Gateway Cluster setup. 

     

    From my understanding AWS ELB does not have a elastic IP both for Internal IP and external IP to communicate between instances within the same cluster.

     

    In that case, with just a external hostname (for external ELB) will this load balancer be suitable for setting up Gateway cluster? I am thinking if the IP addresses change dynamically, it will have issue with my setup on /etc/hosts on my gateway nodes of the cluster. Alternatively, creating an internal ELB might help but it still has the same problems without a static IP address for internal IP. 

     

    Down the road, this might cause issues for API Portal <> API Gateway setup because the cluster IP address can't resolve correctly without a proper IP as it cannot take a hostname. While I can ping the hostname of the external LB to get the IP address, it is still not static by nature.

     

    Hope I can get some advice on this setup on how to do it correctly with AWS Load Balancer as a choice of LB to integrate with Layer7.

     

    Thanks for helping!



  • 2.  Re: Configuring AWS Elastic Load Balancer as LB for API Gateway Cluster & API Portal

    Broadcom Employee
    Posted Oct 27, 2016 02:31 PM

    I'm not sure why you'd need any /etc/hosts entry so that part of your question is unclear, but best practices for us has always been to use both your DNS provider and a static external address for the ELB to set up a destination and certificate that is relevant to your organization. 

     

    Changing IP address dynamically isn't something you should do - even if it saves you a little bit of money, lots of client software caches DNS lookups long enough that I wouldn't depend on DNS refresh times. 

     

    Use hostnames and real DNS entries. You could use ip addresses and a hosts file internally, but that starts to be confusing to me. Are you assuming that once up, an instance changes IP addresses? I assure you, this doesn't happen in AWS, it only changes if you leave the instance down for a long time, so the portal will be at a well known, nearly static address.