Okay so here goes… nothing that jumps out at me but I hope you see something =)
Here is the request generator:
vagrant@vagrant:~$ cd /vagrant
vagrant@vagrant:/vagrant$ tests/measure-http-response-time.sh 5 http://ip-172-31-4-246.ec2.internal:5000/_health/
Pass: All requests completed
Pass: No Failed Reports
Time per request: 64.698 [ms] (mean)
64.698
vagrant@vagrant:/vagrant$ tests/measure-http-response-time.sh 5 http://ip-172-31-4-246.ec2.internal/_health/
Pass: All requests completed
Pass: No Failed Reports
Time per request: 3800.361 [ms] (mean)
3800.361
vagrant@vagrant:/vagrant$
Here are the docker logs on the ec2 host:
[root@ip-172-31-4-246 ec2-user]# docker logs 1fe 2> output.log
[root@ip-172-31-4-246 ec2-user]# cat output.log
{"level":"info","ts":1586267511.4893467,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile.json","config_adapter":""}
{"level":"warn","ts":1586267511.4897754,"logger":"admin","msg":"admin endpoint disabled"}
2020/04/07 13:51:51 [INFO][cache:0xc000332870] Started certificate maintenance routine
{"level":"info","ts":1586267511.5770144,"logger":"tls","msg":"cleaned up storage units"}
{"level":"debug","ts":1586267511.5797288,"logger":"http","msg":"starting server loop","address":"[::]:80","http3":false,"tls":false}
{"level":"debug","ts":1586267511.5804248,"logger":"http","msg":"starting server loop","address":"[::]:443","http3":false,"tls":true}
{"level":"info","ts":1586267511.580546,"msg":"autosaved config","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1586267511.5805566,"msg":"serving initial configuration"}
{"level":"debug","ts":1586267517.7501707,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.16.62:47902","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.16.62"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:51:57 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":4.047934424,"status":200}
{"level":"debug","ts":1586267524.5809896,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.16.62:47902","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.16.62"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:52:04 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":0.881458087,"status":200}
{"level":"debug","ts":1586267524.582245,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.3.255:1646","host":"172.31.4.246","headers":{"Accept":["*/*"],"X-Forwarded-For":["172.31.3.255"],"User-Agent":["ELB-HealthChecker/1.0"]}},"headers":{"Content-Type":["text/html; charset=utf-8"],"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:52:04 GMT"]},"duration":4.00582699,"status":200}
{"level":"debug","ts":1586267534.5807772,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.16.62:47902","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.16.62"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:52:14 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":0.881993506,"status":200}
{"level":"debug","ts":1586267534.5822039,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.3.255:1646","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.3.255"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Content-Type":["text/html; charset=utf-8"],"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:52:14 GMT"]},"duration":4.006082446,"status":200}
{"level":"debug","ts":1586267544.57949,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.16.62:47902","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.16.62"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Content-Type":["text/html; charset=utf-8"],"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:52:24 GMT"]},"duration":0.880635968,"status":200}
{"level":"debug","ts":1586267544.580921,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.3.255:1646","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.3.255"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:52:24 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":4.005514362,"status":200}
{"level":"debug","ts":1586267554.5802798,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.16.62:47902","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.16.62"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:52:34 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":0.881088336,"status":200}
{"level":"debug","ts":1586267554.5813584,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.3.255:1646","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.3.255"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:52:34 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":4.005540764,"status":200}
{"level":"debug","ts":1586267564.5804784,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.16.62:47902","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.16.62"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:52:44 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":0.882079165,"status":200}
{"level":"debug","ts":1586267564.5815897,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.3.255:1646","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.3.255"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Content-Type":["text/html; charset=utf-8"],"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:52:44 GMT"]},"duration":4.005741952,"status":200}
{"level":"debug","ts":1586267574.5813675,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.3.255:1646","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.3.255"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Date":["Tue, 07 Apr 2020 13:52:54 GMT"],"Content-Type":["text/html; charset=utf-8"],"Server":["gunicorn/20.0.4"]},"duration":4.004794574,"status":200}
{"level":"debug","ts":1586267574.5829096,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.16.62:47902","host":"172.31.4.246","headers":{"Accept":["*/*"],"X-Forwarded-For":["172.31.16.62"],"User-Agent":["ELB-HealthChecker/1.0"]}},"headers":{"Content-Type":["text/html; charset=utf-8"],"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:52:54 GMT"]},"duration":0.884323223,"status":200}
{"level":"debug","ts":1586267584.6228886,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.16.62:47902","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.16.62"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:04 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":0.924157332,"status":200}
{"level":"debug","ts":1586267584.6240458,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.3.255:1646","host":"172.31.4.246","headers":{"Accept":["*/*"],"X-Forwarded-For":["172.31.3.255"],"User-Agent":["ELB-HealthChecker/1.0"]}},"headers":{"Content-Type":["text/html; charset=utf-8"],"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:04 GMT"]},"duration":4.046752959,"status":200}
{"level":"debug","ts":1586267584.6252253,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.0","remote_addr":"172.28.14.109:60835","host":"ip-172-31-4-246.ec2.internal","headers":{"User-Agent":["ApacheBench/2.3"],"Accept":["*/*"],"X-Forwarded-For":["172.28.14.109"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:04 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":2.606528891,"status":200}
{"level":"debug","ts":1586267588.6942234,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.0","remote_addr":"172.28.14.109:60836","host":"ip-172-31-4-246.ec2.internal","headers":{"X-Forwarded-For":["172.28.14.109"],"User-Agent":["ApacheBench/2.3"],"Accept":["*/*"]}},"headers":{"Content-Type":["text/html; charset=utf-8"],"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:08 GMT"]},"duration":4.004543377,"status":200}
{"level":"debug","ts":1586267592.7623851,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.3.255:1646","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.3.255"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Content-Type":["text/html; charset=utf-8"],"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:12 GMT"]},"duration":2.185481109,"status":200}
{"level":"debug","ts":1586267592.7639701,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.0","remote_addr":"172.28.14.109:60837","host":"ip-172-31-4-246.ec2.internal","headers":{"X-Forwarded-For":["172.28.14.109"],"User-Agent":["ApacheBench/2.3"],"Accept":["*/*"]}},"headers":{"Content-Type":["text/html; charset=utf-8"],"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:12 GMT"]},"duration":4.006091289,"status":200}
{"level":"debug","ts":1586267596.8449883,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.0","remote_addr":"172.28.14.109:60838","host":"ip-172-31-4-246.ec2.internal","headers":{"X-Forwarded-For":["172.28.14.109"],"User-Agent":["ApacheBench/2.3"],"Accept":["*/*"]}},"headers":{"Date":["Tue, 07 Apr 2020 13:53:16 GMT"],"Content-Type":["text/html; charset=utf-8"],"Server":["gunicorn/20.0.4"]},"duration":4.004229874,"status":200}
{"level":"debug","ts":1586267596.846686,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.16.62:47902","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.16.62"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Content-Type":["text/html; charset=utf-8"],"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:16 GMT"]},"duration":3.147625527,"status":200}
{"level":"debug","ts":1586267600.9497545,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.0","remote_addr":"172.28.14.109:60839","host":"ip-172-31-4-246.ec2.internal","headers":{"X-Forwarded-For":["172.28.14.109"],"User-Agent":["ApacheBench/2.3"],"Accept":["*/*"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:20 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":4.004512102,"status":200}
{"level":"debug","ts":1586267600.9510288,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.3.255:1646","host":"172.31.4.246","headers":{"Accept":["*/*"],"X-Forwarded-For":["172.31.3.255"],"User-Agent":["ELB-HealthChecker/1.0"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:20 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":0.373655015,"status":200}
{"level":"debug","ts":1586267607.70461,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.16.62:47902","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.16.62"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:27 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":4.006394898,"status":200}
{"level":"debug","ts":1586267614.5827413,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.3.255:1646","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.3.255"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Content-Type":["text/html; charset=utf-8"],"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:34 GMT"]},"duration":4.004667755,"status":200}
{"level":"debug","ts":1586267614.5844116,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.16.62:47902","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.16.62"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:34 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":0.885970056,"status":200}
{"level":"debug","ts":1586267623.376046,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.16.62:47974","host":"production.pages.pendleton.systems","headers":{"X-Forwarded-For":["172.31.16.62"],"User-Agent":["curl/7.67.0"],"Accept":["*/*"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:43 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":4.004487141,"status":200}
{"level":"debug","ts":1586267623.3773088,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.3.255:1646","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.3.255"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Content-Type":["text/html; charset=utf-8"],"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:43 GMT"]},"duration":2.79974674,"status":200}
{"level":"debug","ts":1586267627.703219,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.16.62:47902","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.16.62"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Content-Type":["text/html; charset=utf-8"],"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:47 GMT"]},"duration":4.004633631,"status":200}
{"level":"debug","ts":1586267634.5841048,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.16.62:47902","host":"172.31.4.246","headers":{"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"],"X-Forwarded-For":["172.31.16.62"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:54 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":0.886199545,"status":200}
{"level":"debug","ts":1586267634.5913177,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.3.255:1646","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.3.255"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:53:54 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":4.013347891,"status":200}
{"level":"debug","ts":1586267644.6206696,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.16.62:47902","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.16.62"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:54:04 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":0.922186988,"status":200}
{"level":"debug","ts":1586267644.6219041,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"web:5000","request":{"method":"GET","uri":"/_health/","proto":"HTTP/1.1","remote_addr":"172.31.3.255:1646","host":"172.31.4.246","headers":{"X-Forwarded-For":["172.31.3.255"],"User-Agent":["ELB-HealthChecker/1.0"],"Accept":["*/*"]}},"headers":{"Server":["gunicorn/20.0.4"],"Date":["Tue, 07 Apr 2020 13:54:04 GMT"],"Content-Type":["text/html; charset=utf-8"]},"duration":4.044003283,"status":200}
[root@ip-172-31-4-246 ec2-user]#