Uploaded image for project: 'mod_cluster'
  1. mod_cluster
  2. MODCLUSTER-565

Expand mod_cluster manager console to output JSON data about worker nodes

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0.Alpha1
    • Fix Version/s: None
    • Component/s: Native (httpd modules)
    • Labels:
      None

      Description

      mod_proxy_cluster needs a module that would provide a comprehensive command & control visualization of events going on within the balancer and with worker nodes. The visualization would also serve as a demonstration for presentation purposes (to replace current SWING app from ~2009-ish).

      The new module would most likely work with https://d3js.org/ and generate an SVG/JS page on a new added httpd handler. For this new module to work, we need JSON data from mod_cluster manager (currently spits out only HTML/text/XML).

      Task one: mod_cluster manager JSON data

      Bogdan Sikora researched suitable JavaScript libraries and he would like to have the JSON output resemble the following:

      I find the Wildfly style of Undertow mod_cluster proxy filter CLI output the most suitable:

      "balancer" => {"mycluster" => {
                  "max-attempts" => 1,
                  "sticky-session" => true,
                  "sticky-session-cookie" => "JSESSIONID",
                  "sticky-session-force" => false,
                  "sticky-session-path" => undefined,
                  "sticky-session-remove" => false,
                  "wait-worker" => 0,
                  "load-balancing-group" => undefined,
                  "node" => {
                      "jboss-eap-7.1-1" => {
                          "aliases" => [
                              "default-host",
                              "localhost"
                          ],
                          "cache-connections" => 40,
                          "elected" => 0,
                          "flush-packets" => false,
                          "load" => 0,
                          "load-balancing-group" => undefined,
                          "max-connections" => 40,
                          "open-connections" => 0,
                          "ping" => 10,
                          "queue-new-requests" => true,
                          "read" => 0L,
                          "request-queue-size" => 1000,
                          "status" => "NODE_HOT_STANDBY",
                          "timeout" => 0,
                          "ttl" => 60L,
                          "uri" => "ajp://192.168.122.88:8009/?#",
                          "written" => 0L,
                          "context" => {"/clusterbench" => {
                              "requests" => 0,
                              "status" => "enabled"
                          }}
                      },
      

      So, the JSON for my JavaScript renderer could look like:

      {
          "balancers": [{
              "name": "mycluster",
              "max-attempts": 1,
              "sticky-session": true,
              "sticky-session-cookie": "JSESSIONID",
              "sticky-session-force": false,
              "sticky-session-remove": false,
              "wait-worker": 0,
              "workers": [
                  {
                      "name": "jboss-eap-7.1-1",
                      "aliases": ["default-host", "localhost"],
                      "cache-connections": 40,
                      "elected": 0,
                      "flush-packets": false,
                      "load": 0,
                      "requests": 350
                  }, {
                      "name": "jboss-eap-7.1-2",
                      "aliases": ["default-host", "localhost"],
                      "cache-connections": 40,
                      "elected": 0,
                      "flush-packets": false,
                      "load": 0,
                      "requests": 350
                  }
              ]
          }]
      }
      

      Task two: mod_cluster gui console

      Write a separate module that could be optionally loaded alongside with mod_manager to provide the gui JavaScript/SVG gui console and/or consider deploying the console as a web page into the httpd's web serving directory.

        Attachments

          Activity

            People

            Assignee:
            jfclere Jean-Frederic Clere
            Reporter:
            mbabacek Michal Karm
            Involved:
            Bogdan Sikora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: