To make my homepage load super fast, I use 5 MB of my RAM to cache only the landing page layout. I'm trying to move to marathon hosting and using the Marathon-LB, to let him know that the site is ok, he needs some kind of a health check, so I added a simple get request to the root path.
This is how it looks in logs:
healthcheck
App 127 stdout: Started GET "/" for 10.0.0.4 at 2016-11-26 12:17:17 +0000
App 127 stdout: Processing by LandingPageController#landing_page as HTML
App 127 stdout: Read fragment views/localhost/landing_page/8c5d9464799f02903fc528fe21a76d03 (0.0ms)
App 127 stdout: Rendered application/landing_page.html.erb within layouts/landing_layout (0.8ms)
App 127 stdout: Read fragment views/localhost/landing_page/7298641bb68fa254c1f17ffd11320f97 (0.0ms)
App 127 stdout: Completed 200 OK in 2ms (Views: 1.7ms)
regular user request to stage.cltv.site
App 127 stdout: Started GET "/" for 109.67.216.227 at 2016-11-26 12:17:20 +0000
App 127 stdout: Processing by LandingPageController#landing_page as HTML
App 127 stdout: Read fragment views/stage.cltv.site/landing_page/8c5d9464799f02903fc528fe21a76d03 (0.0ms)
Received killTask for task ctv-site.9a686be8-b3d1-11e6-9ea2-70b3d5800001
Both try rendering same page, the only issue I think there is with the cache key that changes because of the origin of the request. one time its from the internal network, second time is from Marathon-LB.
As you can see the server get stuck in this point and Marathon kills it cause it's becoming unhealthy, how do I solve this issue?