Slimming down this page
@@ -5,11 +5,9 @@ title: Habitat - Join Services Together
section
h2 Join Services Together
- p Supervisors can manage their applications in isolation, but the real power of Supervisors comes when they are networked together. The way they do that is by connecting to each other via an IP address and forming a "ring" of two or more Supervisors (although it is more like a peer-to-peer network than a circular ring).
+ p Having your applications automatically discover dependent services and configure themselves accordingly is useful when you need to set up connection information between tiers in a web application.
- p When Supervisors are connected in this way, they start sharing information amongst themselves, such as membership metadata and configuration settings. Configuration values are explicitly exported, so each service in your application has control over what configuration data gets exposed to other services. Once those values are available to the other services, they can automatically bind to those values. Having your applications automatically discover dependent services and configure themselves accordingly is useful if you have ever had to set up connection information between tiers in a web application.
-
- p In our example, the PostgreSQL database service exposes a port number that the Ruby-on-Rails web application needs in order to connect to the database. To set up service binding between the Rails front-end and the PostgreSQL backend, you will restart the Rails app, but this time specifying the IP address of the Supervisor managing the backend and setting the <code>bind</code> argument to the service group name of the database. This will allow you your Rails app to use that port number when it initializes itself and tries to connect to the database.
+ p In our example, the PostgreSQL database service exposes a port number that the Ruby-on-Rails web application needs in order to connect to the database. To set up service binding between the Rails front-end and the PostgreSQL backend, you will restart the Rails app, but this time specifying the IP address of the Supervisor managing the backend and setting the bind argument to the service group name of the database. This will allow you your Rails app to use that port number when it initializes itself and tries to connect to the database.
pre
code.console $ hab start example/myrubyapp --peer 172.17.0.2 --bind database:postgresql.default
