Answers: <p>Historically, <a href="https://f5.com/" rel="nofollow noreferrer">F5's Application Delivery Controller</a> has been the enterprise-grade industry solution for doing this. With this solution you can:</p>
  
  <ul>
  <li>Use <a href="https://devcentral.f5.com/articles/introducing-irules-lx-19888" rel="nofollow noreferrer">iRules LX</a> to communicate with other software to auto-scale on an as-needed basis</li>
  <li>Load balance at Layer 4 (to achieve better throughput/acceleration) or Layer 7</li>
  <li><a href="https://devcentral.f5.com/articles/v101-the-table-command-the-basics" rel="nofollow noreferrer">Share memory between Virtual Servers</a> (there may be a better way using iRules LX instead of just iRules)</li>
  <li><a href="https://f5.com/glossary/ssl-bridging" rel="nofollow noreferrer">Bridge or offload/terminate</a> TLS on the Load Balancer</li>
  <li>Have vendor support and <a href="https://f5.com/about-us/news/press-releases/f5-announces-new-irules-ondemand-service-for-rapid" rel="nofollow noreferrer">consulting</a> if needed</li>
  <li><a href="https://aws.amazon.com/featured-partners/f5/" rel="nofollow noreferrer">Do all of this</a> in <a href="https://aws.amazon.com/marketplace/seller-profile?id=74d946f0-fa54-4d9f-99e8-ff3bd8eb2745" rel="nofollow noreferrer">Amazon's cloud</a>  (or <a href="https://f5.com/products/deployment-methods/virtual-editions" rel="nofollow noreferrer">anyone else's</a>; you can also run it in-house)</li>
  <li>Scale to millions more connections than Kubernetes, nginx, or <a href="http://highscalability.com/blog/2013/5/13/the-secret-to-10-million-concurrent-connections-the-kernel-i.html" rel="nofollow noreferrer">any other load balancer solution that doesn't use a microkernel is capable of.</a></li>
  </ul>
  
Answers: CC BY-SA 3.0
Answers: 2018-01-02T21:20:58.150Z
Answers: Last point is highly debatable and more a commercial speech, cpu and ram speed nowadays are way higher than the underlying hardware, not even talking about virtual appliances on the cloud where you don't handle the hardware nor the vm parameters. (BTW kubernetes is not a load balancer and doesn't have one out of the box, the one you choose is your decision, nginx is a popular choice but f5 has one specific for k8s also)
Answers: Tensibai
Answers: CC BY-SA 3.0
Answers: 2018-01-02T21:28:32.497Z
Answers: @Tensibai - Did you read the article I linked there for support? I can link to several others, but TL;DR the Linux Kernel scales connections poorly. The kernel's algorithms require more CPU comparisons the more connections you make to iterate over and manage memory. This is thus an exponential performance degradation. Microkernels that allocate memory optimized to connection management don't suffer from the same problem. As moores law slows down, this problem will only get worse.
Answers: James Shewey
Answers: CC BY-SA 3.0
Answers: 2018-01-02T21:32:05.187Z
Answers: I just mean a standard network card will show its limits before the kernel cpu needs are slowing things down
Answers: Tensibai
Answers: CC BY-SA 3.0
Answers: 2018-01-02T21:32:55.663Z
Answers: So what that is really saying (marketing-wise) is that you at least need an F5, a Kemp or an A10 as [connections scale past several thousand.](https://www.urbanairship.com/blog/linux-kernel-tuning-for-c500k) or you will need to roll your own system.
Answers: James Shewey
Answers: CC BY-SA 3.0
Answers: 2018-01-02T21:34:35.863Z
Answers: @Tensibai - that really depends. If you have a lot of connections with low throughput (eg, all you are doing is millions of 3-way-handshakes, then closing the connection) you won't necessarily reach a limit on your network card/interface.
Answers: James Shewey
Answers: CC BY-SA 3.0
Answers: 2018-01-02T21:36:08.030Z
Answers: Also see http://www.kegel.com/c10k.html
Answers: James Shewey
Answers: CC BY-SA 3.0
Answers: 2018-01-03T09:55:29.333Z
Answers: You're so much missing my point I'm more and more considering this answer as Spam on top of link-only (remove the links, as when f5 will again review devcentral and their site and break them, and there's not much to read to support the answer itself). F5 are good products, no doubt, I'm just pointing one point which doesn't bring much interest when on AWS as you don't have any clue of which hardware your appliance will run on, there's good chances in real world traffic that using a microkernel doesn't help as the underlying virtualization or hardware IO's will be the bottleneck before.
Answers: Tensibai
Answers: CC BY-SA 3.0
Answers: 2018-01-02T17:40:16.410Z
Answers: 2018-01-02T17:40:16.410Z
Answers: James Shewey
Body: <p>What are my best options for deploying a load balancer on AWS with the following requirments:</p>
  
  <p>Add auto scaling that will start my own EC2 instances.
      Deploy 3rd party SW on the load balancer.
      Have a readable shared memory (can be S3).</p>
  
  <p>Found the tutorial "<a href="https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/" rel="nofollow noreferrer">Create an External Load Balancer</a>" about Kubernetes but not sure about it.</p>
  
  <p>EDIT:</p>
  
  <p>deploy 3rd party [software] on the load balancer" -- to do what: Want to start new instances with parameters and for routing rules to the instances that were created with the auto scaling.</p>
  
  <p>how is "readable shared memory" used, and for what purpose? shared memory between the load balancer and the instances. I can do it with sockets.</p>
  
  <p>Why is the balancer layer 4 as opposed to a different layer? Need TCP parametrs, layer 7 info can also be useful</p>
  
  <p>Where is TLS handled? I havn't thought about this.</p>
  
Comments: CC BY-SA 3.0
Comments: 2017-12-31T16:52:40.417Z
Comments: You might need to clarify "deploy 3rd party [software] on the load balancer" -- to do what?  Why does the 3rd party software need to be *on* the balancer?  Also how is "readable shared memory" used, and for what purpose?  Why is the balancer layer 4 as opposed to a different layer?  Where is TLS handled?  My intention is not to say that there is a problem with the question, but it seems like the answers will be more useful to you and others if we understand what your actual requirements are, as well as what limitations of the AWS balancer options make them unsuitable for your purpose.
Comments: Michael - sqlbot
Comments: CC BY-SA 3.0
Comments: 2018-01-03T10:10:46.727Z
Comments: @nmnir what is your final goal with this load balancer ? How AWS ELB or ALB linked to an auto scaling group are **not** fulfilling your needs ?
Comments: Tensibai
Tags: <amazon-web-services><autoscaling><load-balance>
Title: Custom Layer 4 Load Balancer
UserDisplayName: nmnir
ThreadText: # Custom Layer 4 Load Balancer
  
  (Asked by: username_0 on 2017-12-31)
  
  What are my best options for deploying a load balancer on AWS with the following requirments:
  
  Add auto scaling that will start my own EC2 instances.
  Deploy 3rd party SW on the load balancer.
  Have a readable shared memory (can be S3).
  
  Found the tutorial "[Create an External Load Balancer](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/)" about Kubernetes but not sure about it.
  
  EDIT:
  
  deploy 3rd party [software] on the load balancer" -- to do what: Want to start new instances with parameters and for routing rules to the instances that were created with the auto scaling.
  
  how is "readable shared memory" used, and for what purpose? shared memory between the load balancer and the instances. I can do it with sockets.
  
  Why is the balancer layer 4 as opposed to a different layer? Need TCP parametrs, layer 7 info can also be useful
  
  Where is TLS handled? I havn't thought about this.
  
  **Tags:** amazon-web-services, autoscaling, load-balance
  
  > **Comments:**
  > **username_1**: You might need to clarify "deploy 3rd party [software] on the load balancer" -- to do what?  Why does the 3rd party software need to be *on* the balancer?  Also how is "readable shared memory" used, and for what purpose?  Why is the balancer layer 4 as opposed to a different layer?  Where is TLS handled?  My intention is not to say that there is a problem with the question, but it seems like the answers will be more useful to you and others if we understand what your actual requirements are, as well as what limitations of the AWS balancer options make them unsuitable for your purpose.  
  > **username_2**: @username_0 what is your final goal with this load balancer ? How AWS ELB or ALB linked to an auto scaling group are **not** fulfilling your needs ?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2018-01-02. Score: 2
  
  Historically, [F5's Application Delivery Controller](https://f5.com/) has been the enterprise-grade industry solution for doing this. With this solution you can:
  
  * Use [iRules LX](https://devcentral.f5.com/articles/introducing-irules-lx-19888) to communicate with other software to auto-scale on an as-needed basis
  * Load balance at Layer 4 (to achieve better throughput/acceleration) or Layer 7
  * [Share memory between Virtual Servers](https://devcentral.f5.com/articles/v101-the-table-command-the-basics) (there may be a better way using iRules LX instead of just iRules)
  * [Bridge or offload/terminate](https://f5.com/glossary/ssl-bridging) TLS on the Load Balancer
  * Have vendor support and [consulting](https://f5.com/about-us/news/press-releases/f5-announces-new-irules-ondemand-service-for-rapid) if needed
  * [Do all of this](https://aws.amazon.com/featured-partners/f5/) in [Amazon's cloud](https://aws.amazon.com/marketplace/seller-profile?id=74d946f0-fa54-4d9f-99e8-ff3bd8eb2745) (or [anyone else's](https://f5.com/products/deployment-methods/virtual-editions); you can also run it in-house)
  * Scale to millions more connections than Kubernetes, nginx, or [any other load balancer solution that doesn't use a microkernel is capable of.](http://highscalability.com/blog/2013/5/13/the-secret-to-10-million-concurrent-connections-the-kernel-i.html)
  
  > **Comments:**
  > **username_2**: Last point is highly debatable and more a commercial speech, cpu and ram speed nowadays are way higher than the underlying hardware, not even talking about virtual appliances on the cloud where you don't handle the hardware nor the vm parameters. (BTW kubernetes is not a load balancer and doesn't have one out of the box, the one you choose is your decision, nginx is a popular choice but f5 has one specific for k8s also)  
  > **username_3**: @username_2 - Did you read the article I linked there for support? I can link to several others, but TL;DR the Linux Kernel scales connections poorly. The kernel's algorithms require more CPU comparisons the more connections you make to iterate over and manage memory. This is thus an exponential performance degradation. Microkernels that allocate memory optimized to connection management don't suffer from the same problem. As moores law slows down, this problem will only get worse.  
  > **username_2**: I just mean a standard network card will show its limits before the kernel cpu needs are slowing things down  
  > **username_3**: So what that is really saying (marketing-wise) is that you at least need an F5, a Kemp or an A10 as [connections scale past several thousand.](https://www.urbanairship.com/blog/linux-kernel-tuning-for-c500k) or you will need to roll your own system.  
  > **username_3**: @username_2 - that really depends. If you have a lot of connections with low throughput (eg, all you are doing is millions of 3-way-handshakes, then closing the connection) you won't necessarily reach a limit on your network card/interface.  
  > **username_3**: Also see http://www.kegel.com/c10k.html  
  > **username_2**: You're so much missing my point I'm more and more considering this answer as Spam on top of link-only (remove the links, as when f5 will again review devcentral and their site and break them, and there's not much to read to support the answer itself). F5 are good products, no doubt, I'm just pointing one point which doesn't bring much interest when on AWS as you don't have any clue of which hardware your appliance will run on, there's good chances in real world traffic that using a microkernel doesn't help as the underlying virtualization or hardware IO's will be the bottleneck before.  
  
  ---
  
  