Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-23393

Ambari Requests Too Much Data From Hosts When Logging In

    XMLWordPrintableJSON

Details

    Description

      When first logging into Ambari, the web client makes the following request:
      GET api/v1/clusters/<clusterName>/hosts?fields=

      • Hosts/cpu_count
      • Hosts/host_name
      • Hosts/host_status
      • Hosts/ip
      • Hosts/last_agent_env
      • Hosts/last_heartbeat_time
      • Hosts/maintenance_state
      • Hosts/ph_cpu_count
      • Hosts/public_host_name
      • Hosts/rack_info
      • Hosts/total_mem
      • alerts_summary
      • host_components/HostRoles/desired_admin_state
      • host_components/HostRoles/display_name
      • host_components/HostRoles/maintenance_state
      • host_components/HostRoles/service_name
      • host_components/HostRoles/stale_configs
      • host_components/HostRoles/state
      • host_components/logging
      • stack_versions/HostStackVersions
      • stack_versions/repository_versions/RepositoryVersions/display_name
      • stack_versions/repository_versions/RepositoryVersions/id
      • stack_versions/repository_versions/RepositoryVersions/repository_version

      In a cluster with 100 hosts, this can cause a payload of over 200MB to be returned. The culprit seems to be the Hosts/last_agent_env property, specifically the activeJavaProcs key. If the hosts in the cluster are running a lot of Java processes, this can account for over 90% of the payload (roughly 180MB). This data takes 30 or more seconds for the server to serialize and stream to the socket.

      It looks like Hosts/last_agent_env isn't even needed after initially provisioning a host during the host checks, so it probably can be removed.

      Attachments

        Issue Links

          Activity

            People

              atkach Andrii Tkach
              atkach Andrii Tkach
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m