Open wolruf opened 2 years ago
Good idea. I wasn't doing this because I was doing my initial testing from outside of EC2, but you're absolutely right that if we're testing from inside EC2 it makes sense to use the private address instead.
If you look at https://github.com/cperciva/ec2-boot-bench/commit/96b2e670a9d8be1c712427f62c55c126403d3b8e you'll see roughly what's necessary:
If you're not comfortable writing the patch (I totally understand "I don't use this language often"! I say that a lot with Python code) I can put it together once I catch up with some other re:Invent-related work.
I'll need to provide a patch but my C skills are rusty. To detect SSH socket being closed and open, an option to use the EC2 private IPv4 address instead of the Elastic IP (Public IPv4) can be used to reduce delays even further.
For now, I just modified main.c to use: ip = xmlextract(R->body, R->bodylen, "privateIpAddress"); instead of: ip = xmlextract(R->body, R->bodylen, "ipAddress");