3

I am playing a bit with AWS. My goal is to setup infrastructure, which will have static IP on outgoing connections (requirement from payment provider which solution has been implemented in our app) and in the same time I would like to have load balancing feature. I read some docs and all of them says, that such solution is impossible to achieve, because you need to decide either to use Elastic Load Balance (which doesn't provide static IP) or Elastic IP (which in same time doesn't provide load balance). Is there any kind of trick which can be used in my case?

Thank you in advance for any kind of suggestion.

Piotr

Piotr
  • 123
  • 1
  • 3
  • 12
  • Do you initiate connections to the payment processor, or do they initiate them to you? This makes a big difference here. – ceejayoz Sep 10 '14 at 15:37

2 Answers2

2

If your payment processor requires a static IP then you can not use an ELB on that instance. You will need to assign an Elastic IP to the instance that connects to the payment processor.

The way we got around this with our application that we run in AWS was to set up a second small instance with an Elastic IP and then installed TinyProxy on it. We have a cluster of 8 web servers that sit behind an ELB to handle site traffic, and when they need to connect to our payment processor (which also requires a static IP) the web servers establish the connection through the proxy server. This way the payment processor sees all the connections coming from that one host running TinyProxy.

Bruce P
  • 2,163
  • 3
  • 16
  • 21
1

An alternative to the 'proxy' answer is to use VPC with a NAT box for outgoing connections.

We currently use a proxy for outgoing connections to our payment processor, but we're in the process of migrating to VPC. We can use a load balanced scaling group for incoming connections to our website, but the servers make outgoing requests to the payment processor through a NAT box. The NAT box has a static IP and can be whitelisted by the payment processor.

Just saw the comment about incoming vs outgoing. If the payment processor initiates connections to you, then you'll have to use a proxy with a static IP which then forwards on to your ELB.

Daniel Scott
  • 420
  • 3
  • 11