Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access a web application running on Mesos?

I'm quite new to Mesos, and I'm still trying to wrap my head around its concepts and ideas. So far I think I have understood that basically Mesos tries to abstract away your data center and present it as one big computer.

Using the Mesos + Docker integration it is basically possible to run any application on Mesos, as long as your application can be run from inside a Docker container.

This makes me expect that I can use Mesos to run Node.js applications. This shouldn't be too hard to set up.

I get that I need to create a new application, set its instances & co., and then go for it. Mesos then deploys my application and takes care of distributing it over the data center. When asking Mesos for endpoints I can find out the IP addresses / host names and ports that were created.

But, of course, I want a web application to be available at a specific domain or subdomain, ideally port 80 or 443, also using load-balancing and high-availability. Is there anything built into Mesos that I can use for that?

like image 346
Golo Roden Avatar asked Oct 02 '22 09:10

Golo Roden


1 Answers

Have a look at HAProxy (load balancer), the application might run on any node and in case of failure it will be migrated to another node (and we need to update IP address of our app). From Marathon framework (sort of init.d for Mesos) we can get current IP address and port and update HAProxy config.

Here is a sample project: https://github.com/riywo/sample-fluentd-on-mesos-docker

like image 179
Tombart Avatar answered Oct 13 '22 12:10

Tombart