For anyone who is interested. I was surprised that nginx was not
offering srv lookups in their free version. I found a module that
offered this, however it did not work because of syntax differences in
srv lookups on mesos. I adapted this module to force sending a whole srv
domain, and tests look promising.
You can find this module for now here, but remember if you have groups
in mesos use
service=_https._synapse.dev._tcp.marathon.mesos. ('.' at the end)
https://github.com/f1-outsourcing/ngx_upstream_resolveMK
I have asked if the alpine linux guys can add this in their repository.
So we do not need to go through this compiling hasle every time.