jhg03a opened a new issue #5063: URL: https://github.com/apache/trafficcontrol/issues/5063
<!-- ************ STOP!! ************ If this issue identifies a security vulnerability, DO NOT submit it! Instead, contact the Apache Software Foundation Security Team at [email protected] and follow the guidelines at https://www.apache.org/security/ regarding vulnerability disclosure. - For *SUPPORT QUESTIONS*, use the [Traffic Control slack channels](https://traffic-control-cdn.slack.com) or [Traffic Control mailing lists](http://trafficcontrol.apache.org/mailing_lists/). - Before submitting, please **SEARCH GITHUB** for a similar issue or PR. --> ## I'm submitting a ... <!-- delete all those that don't apply --> <!--- security vulnerability (STOP!! - see above)--> - feature - improvement request (usability, performance, tech debt, etc.) ## Traffic Control components affected ... <!-- delete all those that don't apply --> - Traffic Ops ## Current behavior: <!-- Describe how the bug manifests / how the current features are insufficient. --> ### Formulation of how TO connects to InfluxDB to proxy metric queries for TP graphs today: 1. Look for Server Objects or type INFLUXDB in an ONLINE state unordered and take the first result 2. Look at the influxdb.conf file for a boolean parameter of `secure` 3. Fabricate a URL given the results of 1 & 2 using a port from 1 based on the value of 2 4. Use 3 regardless of if it works or not ## Expected / new behavior: <!-- Describe what the behavior would be without the bug / how the feature would improve Traffic Control --> ### Formulation of how TO could connect to InfluxDB in order to proxy metric queries for TP graphs: 1. Look at a config parameter in influxdb.conf for an array of URLs similar to how Traffic Stats specifies InfluxDB URLs 2. Leverage the `/ping` operation of InfluxDB to determine which, if any, and form a cluster in memory for InfluxDB URLs 3. Leverage the cluster to round robin distribute influx queries among targets. 4. Add/remove hosts from the in memory cluster based on error responses and timeouts from the InfluxDB target URLs. ### This has the following benefits: 1. Greater resiliency for influxdb queries 2. Separates the specification of influxdb targets from TO Server Objects. This permits the usage of proxies and load balancers outside of TO that today would have to be modeled as InfluxDB servers to be used instead of real influxDB servers that would have to go by a different type or be OFFLINE. 3. Removes configuration magic by no longer getting TO server objects in specific states and boolean values outside of those objects from a config file to create the destination URL used but not displayed anywhere in TP. <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
