Shoal - Squid Proxy Discovery and Management

The Shoal system has been running stable in a production environment for several years now without much change. The goal of Shoal is to help provide contextualization to new virtual machines in a cloud production habitat. More simply- Shoal provides virtual machines with some squid proxies where they can retrieve the software and data they need to run their payloads without going all the way to the source.

The Shoal system is broken down into three components:
  • shoal-agent
  • shoal-server
  • shoal-client
The shoal-agent is a daemon process that runs on a squid proxy cache. The daemon collects various health metrics and configuration information about the squid and sends the shoal-server a message via AMQP (Advanced Message Queuing Protocol). Each installation of shoal-agent will have a shoal-agent configuration file typically found at /etc/shoal/shoal_agent.conf. This file allows you to configure several things about the squid cache such as which shoal-server to register to, who the shoal-server is allowed to serve this squid to (for issues with firewalls or users who don't wish to share their proxy with other shoal-users), and logging options. More details about all the configuration options can be found in the default config file.

The shoal-server is a RESTful web-service that processes the incoming AMQP messages and maintains a list of all active squid proxies (squids running shoal-agents). The server exposes the proxies via a REST interface that inspects the requester's IP and returns an ordered list of the most appropriate proxies based on the proxy's current load and geographic location in relation to the requester. For example anyone can visit http://shoal.heprc.uvic.ca/nearest/10 and receive a JSON package of the 10 most suitable proxies.

The shoal-client is a small python script that simply leverages the REST interface provided by the shoal-server. Running the shoal-client without any options will contact the shoal-server specified in the shoal-client configuration file for the most appropriate proxies then use cvmfs-talk to update the active proxy configuration.

In the recent 0.6.4 release of the shoal-client a new option has been added to support frontier clients. Running shoal-client with the --frontier (or -f) option produces an output string appropriate for setting the frontier proxy environment variable. More information about the frontier option can be found at the shoal github page. This release also changes the client to use the sys-log instead of it's own dedicated log which removes the need for user permissions and any pre-configuration of a log file.

If you'd like to add your squid proxies to the shoal-server list to begin using shoal with your system, Frank Berghaus has made some detailed instructions in a previous blog post.

Comments

Popular posts from this blog

Grid-mapfile based authentication for DynaFed

Monitoring Dynafed with ELK

Glint Version 2 Enters Production