ocket8888 commented on a change in pull request #4521: Multi-interface Servers 
blueprint
URL: https://github.com/apache/trafficcontrol/pull/4521#discussion_r398239518
 
 

 ##########
 File path: blueprints/multi-interface-servers.md
 ##########
 @@ -0,0 +1,670 @@
+<!--
+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.
+-->
+# Additional Server Interfaces
+
+## Problem Description
+Multiple network interfaces may be used by cache servers to service requests.
+However, these cannot be expressed as parts of the current "server" object.
+Specifically, assuming each interface has its own IP address, then each would
+need to be treated as a separate cache server. This means that getting clients
+to use one when the other is unavailable requires manual intervention.
+
+## Proposed Change
+Instead, cache servers should be configurable with numerous network interfaces
+monitored by Traffic Monitor that are all associated with the server, each
+having its own associated network information e.g. IP Address, but Traffic
+Router should only be aware of the "main" interface on which the cache server
+listens for connections.
+
+The specific use-case outlined above, obviously, entails some management be 
done
+on the cache servers to actually support multiple interfaces answering to the
+same "main" IP address and this should be considered outside of
+<abbr title="Apache Traffic Control">ATC</abbr>'s scope of operation.
+
+## Data Model Impact
+The proposed structure of each of these interfaces is given below as a pair of
+TypeScript<sup>[1](#typescript)</sup> interfaces:
+```typescript
+interface IPAddress {
+       /**
+        * The actual IP (v4 or v6) address which is used by an interface.
+        * Any "mask" should be present here as a CIDR-notation suffix.
+        */
+       address: string;
+
+       /**
+        * The IP (v4 or v6) address of the gateway used by this IP address.
+        */
+       gateway: string;
+
+       /**
+        * Tells whether or not this address of this interface is the server's
+        * "service" address.
+        * At least one address of EXACTLY ONE interface MUST have this set to
+        * 'true' for a server.
+        */
+       serviceAddress: boolean;
+}
+
+interface Interface {
+       /**
+        * The name of the interface device on the server e.g. eth0.
+        */
+       name: string;
+       /**
+        * These will be all of the IPv4/IPv6 addresses assigned to the 
interface,
+        * including gateways and "masks".
+        * It is illegal for an interface to not have at least one associated IP
+        * address.
+        */
+       ipAddresses: Array<IPAddress> & {0: IPAddress};
+       /**
+        * Whether or not Traffic Monitor should monitor this particular 
interface.
+        */
+       monitor: boolean;
+       /**
+        * The interface's Maximum Transmission Unit.
+        * If this is 'null' it is assumed that the interface's MTU is not 
known/is
+        * irrelevant.
+        */
+       mtu: 1500 | 9000 | null;
+}
+```
+We don't have a real data model for ATC, so what follows is an approximately
+defined representation of a "server" that is valid within certain contexts. The
+modifications made to it for the purposes of the changes herein proposed should
+be considered valid in those same contexts - whatever they may be.
+
+```typescript
+interface Server {
+
+       cachegroup?:  string | null;
+       cachegroupId: number;
+       cdnId:        number;
+       cdnName?:     string | null;
+       domainName:   string;
+       guid?:        string | null;
+       hostName:     string;
+       httpsPort?:   number | null;
+       id?:          number;
+
+       // ILO things aren't being moved in because they also require a
+       // username/password that aren't used by any other interface type.
+       iloIpAddress?: string | null;
+       iloIpGateway?: string | null;
+       iloIpNetmask?: string | null;
+       iloPassword?:  string | null;
+       iloUsername?:  string | null;
+
+       /**
+        * New field containing additional interfaces.
+        * It is illegal for a server to not have at least one interface.
+        */
+       interfaces: Array<Interface> & {0: Interface};
+       lastUpdated?:  string;
+
+       // notice not here: mgmtIpAddress, mgmtIpGateway, mgmtIpNetmask
+       // these will be moved into the interfaces property
+
+       offlineReason:   string;
+       physLocation?:   string | null;
+       physLocationId:  number;
+       profile?:        string | null;
+       profileDesc?:    string | null;
+       profileId:       number;
+       revalPending?:   boolean;
+       rack?:           string | null;
+       routerHostName?: string | null;
+       routerPortName?: string | null;
+       status?:         string | null;
+       statusId:        number;
+       tcpPort:         number;
+       type?:           string | null;
+       typeId:          number;
+       updPending?:     boolean;
+       xmppId?:         string | null;
+       xmppPassword?:   string | null;
+}
+```
+
+`/monitoring` payloads and CDN Snapshots are purposely un-versioned and
+un-modeled, so this section will make no attempts to define the model changes 
to
+those objects.
+
+## Impacted Components
+The only components that should need to be modified to accommodate this feature
+are Traffic Ops, Traffic Portal, and Traffic Monitor.
+
+### Traffic Ops Impact
+
+#### Database
+A new table will need to be introduced to contain interface information:
+`interface`, which is described below.
+```text
+              Table "public.interface"
+ Column  |  Type   | Collation | Nullable | Default
+---------+---------+-----------+----------+---------
+ name    | text    |           | not null |
+ server  | bigint  |           | not null |
+ monitor | boolean |           | not null |
+ mtu     | integer |           |          | 1500
 
 Review comment:
   I went with >1280

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to