You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/01/26 20:12:42 UTC

[GitHub] limited closed pull request #1798: Traffic Ops API/GUI configuration of FQ Pacing plugin

limited closed pull request #1798: Traffic Ops API/GUI configuration of FQ Pacing plugin
URL: https://github.com/apache/incubator-trafficcontrol/pull/1798
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/source/admin/traffic_ops/using.rst b/docs/source/admin/traffic_ops/using.rst
index 58ed6b8e5c..c5ce429054 100644
--- a/docs/source/admin/traffic_ops/using.rst
+++ b/docs/source/admin/traffic_ops/using.rst
@@ -357,6 +357,9 @@ The fields in the Delivery Service view are:
 | Maximum Transactions per Second allowed globally | The maximum transactions per se this delivery service can serve across all EDGE caches before traffic will be diverted to the bypass destination. For a DNS delivery service, the Bypass Ipv4 or Ipv6  will be used |
 |                                                  | (depending on whether this was a A or AAAA request), and for HTTP delivery services the Bypass FQDN will be used.                                                                                                   |
 +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| Maximum Bytes per Second allowed per session     | The maximum bytes per second a cache will delivery on any single TCP connection. This uses the Linux kernel's Fair Queuing setsockopt(SO_MAX_PACING_RATE) to limit the rate of delivery. Traffic exceeding this     |
+|                                                  | speed will only be rate-limited and not diverted. This option *requires* `net.core.default_qdisc = fq` in `/etc/sysctl.conf`.                                                                                       |
++--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | Geo Miss Default Latitude                        | Default Latitude for this delivery service. When client localization fails for both Coverage Zone and Geo Lookup, this the client will be routed as if it was at this lat.                                          |
 +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | Geo Miss Default Longitude                       | Default Longitude for this delivery service. When client localization fails for bot Coverage Zone and Geo Lookup, this the client will be routed as if it was at this long.                                         |
diff --git a/docs/source/development/traffic_ops_api/v12/deliveryservice.rst b/docs/source/development/traffic_ops_api/v12/deliveryservice.rst
index 2884a4b58a..0be0a0e326 100644
--- a/docs/source/development/traffic_ops_api/v12/deliveryservice.rst
+++ b/docs/source/development/traffic_ops_api/v12/deliveryservice.rst
@@ -104,6 +104,9 @@ Delivery Service
   |                          |        | traffic will be sent to the dnsByPassIp* for DNS deliveryservices and to the httpBypassFqdn for                                      |
   |                          |        | HTTP deliveryservices                                                                                                                |
   +--------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+
+  | ``fqPacingRate``         |  int   | The maximum rate in bytes per second for each TCP connection in this delivery service. If exceeded,                                  |
+  |                          |        | will be rate limited by the Linux kernel. A default value of 0 disables this feature                                                 |
+  +--------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+  
   | ``httpBypassFqdn``       | string | The HTTP destination to use for bypass on an HTTP deliveryservice - bypass starts when serving more than the                         |
   |                          |        | globalMaxMbps traffic on this deliveryservice.                                                                                       |
   +--------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+
@@ -222,6 +225,7 @@ Delivery Service
             "geoProvider": "0",
             "globalMaxMbps": null,
             "globalMaxTps": "0",
+	    "fqPacingRate": "0",
             "httpBypassFqdn": "",
             "id": "442",
             "infoUrl": "",
@@ -339,6 +343,9 @@ Delivery Service
   |                          |        | traffic will be sent to the dnsByPassIp* for DNS deliveryservices and to the httpBypassFqdn for                                      |
   |                          |        | HTTP deliveryservices                                                                                                                |
   +--------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+
+  | ``fqPacingRate``         |  int   | The maximum rate in bytes per second for each TCP connection in this delivery service. If exceeded,                                  |
+  |                          |        | will be rate limited by the Linux kernel. A default value of 0 disables this feature                                                 |  
+  +--------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+
   | ``httpBypassFqdn``       | string | The HTTP destination to use for bypass on an HTTP deliveryservice - bypass starts when serving more than the                         |
   |                          |        | globalMaxMbps traffic on this deliveryservice.                                                                                       |
   +--------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+
@@ -465,6 +472,7 @@ Delivery Service
             "geoProvider": "0",
             "globalMaxMbps": null,
             "globalMaxTps": "0",
+	    "fqPacingRate": "0",
             "httpBypassFqdn": "",
             "id": "442",
             "infoUrl": "",
@@ -2099,6 +2107,9 @@ URL Sig Keys
   |                        |          | traffic will be sent to the dnsByPassIp* for DNS deliveryservices and to the httpBypassFqdn for         |
   |                        |          | HTTP deliveryservices                                                                                   |
   +------------------------+----------+---------------------------------------------------------------------------------------------------------+
+  | fqPacingRate           | no       | The maximum rate in bytes per second for each TCP connection in this delivery service. If exceeded,     |
+  |                        |          | will be rate limited by the Linux kernel. A default value of 0 disables this feature                    |  
+  +------------------------+----------+---------------------------------------------------------------------------------------------------------+
   | httpBypassFqdn         | no       | The HTTP destination to use for bypass on an HTTP deliveryservice - bypass starts when serving more     |
   |                        |          | than the globalMaxMbps traffic on this deliveryservice.                                                 |
   +------------------------+----------+---------------------------------------------------------------------------------------------------------+
@@ -2273,6 +2284,9 @@ URL Sig Keys
   | ``httpBypassFqdn``       | string | The HTTP destination to use for bypass on an HTTP deliveryservice - bypass starts when serving more than the                         |
   |                          |        | globalMaxMbps traffic on this deliveryservice.                                                                                       |
   +--------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+
+  | ``fqPacingRate``         |  int   | The maximum rate in bytes per second for each TCP connection in this delivery service. If exceeded,                                  |
+  |                          |        | will be rate limited by the Linux kernel. A default value of 0 disables this feature                                                 |  
+  +--------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+
   | ``id``                   |  int   | The deliveryservice id (database row number).                                                                                        |
   +--------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+
   | ``infoUrl``              | string | Use this to add a URL that points to more information about that deliveryservice.                                                    |
@@ -2392,6 +2406,7 @@ URL Sig Keys
             "geoProvider": "0",
             "globalMaxMbps": null,
             "globalMaxTps": "0",
+	    "fqPacingRate": "0",
             "httpBypassFqdn": "",
             "id": "442",
             "infoUrl": "",
@@ -2509,6 +2524,9 @@ URL Sig Keys
   |                        |          | traffic will be sent to the dnsByPassIp* for DNS deliveryservices and to the httpBypassFqdn for         |
   |                        |          | HTTP deliveryservices                                                                                   |
   +------------------------+----------+---------------------------------------------------------------------------------------------------------+
+  | fqPacingRate           | no       | The maximum rate in bytes per second for each TCP connection in this delivery service. If exceeded,     |
+  |                        |          | will be rate limited by the Linux kernel. A default value of 0 disables this feature                    |  
+  +------------------------+----------+---------------------------------------------------------------------------------------------------------+
   | httpBypassFqdn         | no       | The HTTP destination to use for bypass on an HTTP deliveryservice - bypass starts when serving more     |
   |                        |          | than the globalMaxMbps traffic on this deliveryservice.                                                 |
   +------------------------+----------+---------------------------------------------------------------------------------------------------------+
@@ -2680,6 +2698,9 @@ URL Sig Keys
   |                          |        | traffic will be sent to the dnsByPassIp* for DNS deliveryservices and to the httpBypassFqdn for                                      |
   |                          |        | HTTP deliveryservices                                                                                                                |
   +--------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+
+  | ``fqPacingRate``         |  int   | The maximum rate in bytes per second for each TCP connection in this delivery service. If exceeded,                                  |
+  |                          |        | will be rate limited by the Linux kernel. A default value of 0 disables this feature                                                 |  
+  +--------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+
   | ``httpBypassFqdn``       | string | The HTTP destination to use for bypass on an HTTP deliveryservice - bypass starts when serving more than the                         |
   |                          |        | globalMaxMbps traffic on this deliveryservice.                                                                                       |
   +--------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+
@@ -2802,6 +2823,7 @@ URL Sig Keys
             "geoProvider": "0",
             "globalMaxMbps": null,
             "globalMaxTps": "0",
+	    "fqPacingRate": "0",
             "httpBypassFqdn": "",
             "id": "442",
             "infoUrl": "",
@@ -2949,6 +2971,9 @@ URL Sig Keys
   |                          |        | traffic will be sent to the dnsByPassIp* for DNS deliveryservices and to the httpBypassFqdn for                                      |
   |                          |        | HTTP deliveryservices                                                                                                                |
   +--------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+
+  | ``fqPacingRate``         |  int   | The maximum rate in bytes per second for each TCP connection in this delivery service. If exceeded,                                  |
+  |                          |        | will be rate limited by the Linux kernel. A default value of 0 disables this feature                                                 |  
+  +--------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+
   | ``httpBypassFqdn``       | string | The HTTP destination to use for bypass on an HTTP deliveryservice - bypass starts when serving more than the                         |
   |                          |        | globalMaxMbps traffic on this deliveryservice.                                                                                       |
   +--------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+
@@ -3071,6 +3096,7 @@ URL Sig Keys
             "geoProvider": "0",
             "globalMaxMbps": null,
             "globalMaxTps": "0",
+	    "fqPacingRate": "0",
             "httpBypassFqdn": "",
             "id": "442",
             "infoUrl": "www.info.com",
diff --git a/traffic_ops/app/db/migrations/20180117000000_add_fq_pacing.sql b/traffic_ops/app/db/migrations/20180117000000_add_fq_pacing.sql
new file mode 100644
index 0000000000..e033fcdb02
--- /dev/null
+++ b/traffic_ops/app/db/migrations/20180117000000_add_fq_pacing.sql
@@ -0,0 +1,23 @@
+/*
+
+    Licensed 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.
+*/
+
+-- +goose Up
+-- SQL in section 'Up' is executed when this migration is applied
+ALTER TABLE deliveryservice ADD COLUMN fq_pacing_rate bigint default 0;
+
+-- +goose Down
+-- SQL section 'Down' is executed when this migration is rolled back
+ALTER TABLE deliveryservice DROP COLUMN fq_pacing_rate;
+
diff --git a/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm b/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
index 2b5d5c53ca..a4a0bb974e 100755
--- a/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
+++ b/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
@@ -505,6 +505,7 @@ sub delivery_service_data_by_profile {
 		deliveryservice.protocol,
 		deliveryservice.ssl_key_version,
 		deliveryservice.range_request_handling,
+		deliveryservice.fq_pacing_rate,
 		deliveryservice.edge_header_rewrite,
 		deliveryservice.mid_header_rewrite,
 		deliveryservice.regex_remap,
@@ -550,6 +551,7 @@ sub delivery_service_data_by_profile {
 	my $deliveryservice_protocol;
 	my $deliveryservice_ssl_key_version;
 	my $deliveryservice_range_request_handling;
+	my $deliveryservice_fq_pacing_rate;
 	my $deliveryservice_edge_header_rewrite;
 	my $deliveryservice_mid_header_rewrite;
 	my $deliveryservice_regex_remap;
@@ -575,6 +577,7 @@ sub delivery_service_data_by_profile {
 		\$deliveryservice_protocol,
 		\$deliveryservice_ssl_key_version,
 		\$deliveryservice_range_request_handling,
+		\$deliveryservice_fq_pacing_rate,
 		\$deliveryservice_edge_header_rewrite,
 		\$deliveryservice_mid_header_rewrite,
 		\$deliveryservice_regex_remap,
@@ -604,6 +607,7 @@ sub delivery_service_data_by_profile {
 					"protocol" => $deliveryservice_protocol,
 					"ssl_key_version" => $deliveryservice_ssl_key_version,
 					"range_request_handling" => $deliveryservice_range_request_handling,
+					"fq_pacing_rate" => $deliveryservice_fq_pacing_rate,
 					"edge_header_rewrite" => $deliveryservice_edge_header_rewrite,
 					"mid_header_rewrite" => $deliveryservice_mid_header_rewrite,
 					"regex_remap" => $deliveryservice_regex_remap,
@@ -644,6 +648,7 @@ sub profile_ds_data {
 		my $regex_remap                 = $row->{'regex_remap'};
 		my $protocol                    = $row->{'protocol'};
 		my $range_request_handling      = $row->{'range_request_handling'};
+		my $fq_pacing_rate              = $row->{'fq_pacing_rate'};
 		my $origin_shield               = $row->{'origin_shield'};
 		my $cacheurl                    = $row->{'cacheurl'};
 		my $remap_text                  = $row->{'remap_text'};
@@ -713,6 +718,7 @@ sub profile_ds_data {
 		$dsinfo->{dslist}->[$j]->{"mid_header_rewrite"}          = $mid_header_rewrite;
 		$dsinfo->{dslist}->[$j]->{"regex_remap"}                 = $regex_remap;
 		$dsinfo->{dslist}->[$j]->{"range_request_handling"}      = $range_request_handling;
+		$dsinfo->{dslist}->[$j]->{"fq_pacing_rate"}              = $fq_pacing_rate;
 		$dsinfo->{dslist}->[$j]->{"origin_shield"}               = $origin_shield;
 		$dsinfo->{dslist}->[$j]->{"cacheurl"}                    = $cacheurl;
 		$dsinfo->{dslist}->[$j]->{"remap_text"}                  = $remap_text;
@@ -768,6 +774,7 @@ sub cdn_ds_data {
 		my $regex_remap                 = $row->regex_remap;
 		my $protocol                    = $row->protocol;
 		my $range_request_handling      = $row->range_request_handling;
+		my $fq_pacing_rate              = $row->fq_pacing_rate;
 		my $origin_shield               = $row->origin_shield;
 		my $cacheurl                    = $row->cacheurl;
 		my $remap_text                  = $row->remap_text;
@@ -837,6 +844,7 @@ sub cdn_ds_data {
 		$dsinfo->{dslist}->[$j]->{"mid_header_rewrite"}          = $mid_header_rewrite;
 		$dsinfo->{dslist}->[$j]->{"regex_remap"}                 = $regex_remap;
 		$dsinfo->{dslist}->[$j]->{"range_request_handling"}      = $range_request_handling;
+		$dsinfo->{dslist}->[$j]->{"fq_pacing_rate"}              = $fq_pacing_rate;
 		$dsinfo->{dslist}->[$j]->{"origin_shield"}               = $origin_shield;
 		$dsinfo->{dslist}->[$j]->{"cacheurl"}                    = $cacheurl;
 		$dsinfo->{dslist}->[$j]->{"remap_text"}                  = $remap_text;
@@ -902,6 +910,7 @@ sub ds_data {
 		my $regex_remap                 = $dsinfo->regex_remap;
 		my $protocol                    = $dsinfo->protocol;
 		my $range_request_handling      = $dsinfo->range_request_handling;
+		my $fq_pacing_rate              = $dsinfo->fq_pacing_rate;
 		my $origin_shield               = $dsinfo->origin_shield;
 		my $cacheurl                    = $dsinfo->cacheurl;
 		my $remap_text                  = $dsinfo->remap_text;
@@ -970,6 +979,7 @@ sub ds_data {
 		$response_obj->{dslist}->[$j]->{"mid_header_rewrite"}          = $mid_header_rewrite;
 		$response_obj->{dslist}->[$j]->{"regex_remap"}                 = $regex_remap;
 		$response_obj->{dslist}->[$j]->{"range_request_handling"}      = $range_request_handling;
+		$response_obj->{dslist}->[$j]->{"fq_pacing_rate"}              = $fq_pacing_rate;
 		$response_obj->{dslist}->[$j]->{"origin_shield"}               = $origin_shield;
 		$response_obj->{dslist}->[$j]->{"cacheurl"}                    = $cacheurl;
 		$response_obj->{dslist}->[$j]->{"remap_text"}                  = $remap_text;
@@ -1138,6 +1148,7 @@ sub remap_ds_data {
 			my $regex_remap                 = $dsinfo->regex_remap;
 			my $protocol                    = $dsinfo->protocol;
 			my $range_request_handling      = $dsinfo->range_request_handling;
+			my $fq_pacing_rate              = $dsinfo->fq_pacing_rate;
 			my $cacheurl                    = $dsinfo->cacheurl;
 			my $remap_text                  = $dsinfo->remap_text;
 
@@ -1201,6 +1212,7 @@ sub remap_ds_data {
 			$response_obj->{dslist}->[$j]->{"edge_header_rewrite"}         = $edge_header_rewrite;
 			$response_obj->{dslist}->[$j]->{"regex_remap"}                 = $regex_remap;
 			$response_obj->{dslist}->[$j]->{"range_request_handling"}      = $range_request_handling;
+			$response_obj->{dslist}->[$j]->{"fq_pacing_rate"}              = $fq_pacing_rate;
 			$response_obj->{dslist}->[$j]->{"cacheurl"}                    = $cacheurl;
 			$response_obj->{dslist}->[$j]->{"remap_text"}                  = $remap_text;
 
@@ -2678,6 +2690,9 @@ sub build_remap_line {
 	if ( defined( $remap->{remap_text} ) ) {
 		$text .= " " . $remap->{remap_text};
 	}
+	if ( defined( $remap->{fq_pacing_rate} ) && $remap->{fq_pacing_rate} > 0 ) {
+		$text .= " \@plugin=fq_pacing.so \@pparam=--rate=" . $remap->{fq_pacing_rate}; 
+	}	
 	$text .= "\n";
 	return $text;
 }
diff --git a/traffic_ops/app/lib/API/Deliveryservice.pm b/traffic_ops/app/lib/API/Deliveryservice.pm
index 7241bd7d9a..19c23d08c4 100644
--- a/traffic_ops/app/lib/API/Deliveryservice.pm
+++ b/traffic_ops/app/lib/API/Deliveryservice.pm
@@ -120,6 +120,7 @@ sub index {
 				"geoProvider"          => $row->geo_provider,
 				"globalMaxMbps"        => $row->global_max_mbps,
 				"globalMaxTps"         => $row->global_max_tps,
+				"fqPacingRate"         => $row->fq_pacing_rate,
 				"httpBypassFqdn"       => $row->http_bypass_fqdn,
 				"id"                   => $row->id,
 				"infoUrl"              => $row->info_url,
@@ -240,6 +241,7 @@ sub show {
 				"geoProvider"          => $row->geo_provider,
 				"globalMaxMbps"        => $row->global_max_mbps,
 				"globalMaxTps"         => $row->global_max_tps,
+				"fqPacingRate"         => $row->fq_pacing_rate,
 				"httpBypassFqdn"       => $row->http_bypass_fqdn,
 				"id"                   => $row->id,
 				"infoUrl"              => $row->info_url,
@@ -345,6 +347,7 @@ sub update {
 		geo_provider           => $params->{geoProvider},
 		global_max_mbps        => $params->{globalMaxMbps},
 		global_max_tps         => $params->{globalMaxTps},
+		fq_pacing_rate         => $params->{fqPacingRate},
 		http_bypass_fqdn       => $params->{httpBypassFqdn},
 		info_url               => $params->{infoUrl},
 		initial_dispersion     => $params->{initialDispersion},
@@ -443,6 +446,7 @@ sub update {
 				"geoProvider"              => $rs->geo_provider,
 				"globalMaxMbps"            => $rs->global_max_mbps,
 				"globalMaxTps"             => $rs->global_max_tps,
+				"fqPacingRate"             => $rs->fq_pacing_rate,
 				"httpBypassFqdn"           => $rs->http_bypass_fqdn,
 				"id"                       => $rs->id,
 				"infoUrl"                  => $rs->info_url,
@@ -574,6 +578,7 @@ sub safe_update {
 				"geoProvider"              => $rs->geo_provider,
 				"globalMaxMbps"            => $rs->global_max_mbps,
 				"globalMaxTps"             => $rs->global_max_tps,
+				"fqPacingRate"             => $rs->fq_pacing_rate,
 				"httpBypassFqdn"           => $rs->http_bypass_fqdn,
 				"id"                       => $rs->id,
 				"infoUrl"                  => $rs->info_url,
@@ -679,6 +684,7 @@ sub create {
 		geo_provider           => $params->{geoProvider},
 		global_max_mbps        => $params->{globalMaxMbps},
 		global_max_tps         => $params->{globalMaxTps},
+		fq_pacing_rate         => $params->{fqPacingRate},
 		http_bypass_fqdn       => $params->{httpBypassFqdn},
 		info_url               => $params->{infoUrl},
 		initial_dispersion     => $params->{initialDispersion},
@@ -788,6 +794,7 @@ sub create {
 				"geoProvider"              => $insert->geo_provider,
 				"globalMaxMbps"            => $insert->global_max_mbps,
 				"globalMaxTps"             => $insert->global_max_tps,
+				"fqPacingRate"             => $insert->fq_pacing_rate,
 				"httpBypassFqdn"           => $insert->http_bypass_fqdn,
 				"id"                       => $insert->id,
 				"infoUrl"                  => $insert->info_url,
@@ -979,6 +986,7 @@ sub get_deliveryservices_by_serverId {
 					"geoProvider"          => $row->geo_provider,
 					"globalMaxMbps"        => $row->global_max_mbps,
 					"globalMaxTps"         => $row->global_max_tps,
+					"fqPacingRate"         => $row->fq_pacing_rate,
 					"httpBypassFqdn"       => $row->http_bypass_fqdn,
 					"id"                   => $row->id,
 					"infoUrl"              => $row->info_url,
@@ -1077,6 +1085,7 @@ sub get_deliveryservices_by_userId {
 					"geoProvider"          => $row->geo_provider,
 					"globalMaxMbps"        => $row->global_max_mbps,
 					"globalMaxTps"         => $row->global_max_tps,
+					"fqPacingRate"         => $row->fq_pacing_rate,    
 					"httpBypassFqdn"       => $row->http_bypass_fqdn,
 					"id"                   => $row->id,
 					"infoUrl"              => $row->info_url,
@@ -1370,7 +1379,7 @@ sub is_deliveryservice_valid {
 
 	my $rules = {
 		fields => [
-			qw/active cacheurl ccrDnsTtl cdnId checkPath displayName dnsBypassCname dnsBypassIp dnsBypassIp6 dnsBypassTtl dscp edgeHeaderRewrite geoLimitRedirectURL geoLimit geoLimitCountries geoProvider globalMaxMbps globalMaxTps httpBypassFqdn infoUrl initialDispersion ipv6RoutingEnabled logsEnabled longDesc longDesc1 longDesc2 maxDnsAnswers midHeaderRewrite missLat missLong multiSiteOrigin multiSiteOriginAlgorithm orgServerFqdn originShield profileId protocol qstringIgnore rangeRequestHandling regexRemap regionalGeoBlocking remapText routingName signed signingAlgorithm sslKeyVersion tenantId trRequestHeaders trResponseHeaders typeId xmlId/
+			qw/active cacheurl ccrDnsTtl cdnId checkPath displayName dnsBypassCname dnsBypassIp dnsBypassIp6 dnsBypassTtl dscp edgeHeaderRewrite geoLimitRedirectURL geoLimit geoLimitCountries geoProvider globalMaxMbps globalMaxTps fqPacingRate httpBypassFqdn infoUrl initialDispersion ipv6RoutingEnabled logsEnabled longDesc longDesc1 longDesc2 maxDnsAnswers midHeaderRewrite missLat missLong multiSiteOrigin multiSiteOriginAlgorithm orgServerFqdn originShield profileId protocol qstringIgnore rangeRequestHandling regexRemap regionalGeoBlocking remapText routingName signed signingAlgorithm sslKeyVersion tenantId trRequestHeaders trResponseHeaders typeId xmlId/
 		],
 
 		# validation checks to perform for ALL delivery services
@@ -1385,6 +1394,7 @@ sub is_deliveryservice_valid {
 			geoProvider			=> [ is_required("is required"), \&is_valid_int_or_undef ],
 			globalMaxMbps			=> [ \&is_valid_int_or_undef ],
 			globalMaxTps			=> [ \&is_valid_int_or_undef ],
+			fqPacingRate                    => [ \&is_valid_int_or_undef ],
 			initialDispersion		=> [ \&is_valid_int_or_undef ],
 			logsEnabled			=> [ is_required("is required") ],
 			maxDnsAnswers			=> [ \&is_valid_int_or_undef ],
diff --git a/traffic_ops/app/lib/Fixtures/Deliveryservice.pm b/traffic_ops/app/lib/Fixtures/Deliveryservice.pm
index 0ca854ca77..2e306e0d03 100644
--- a/traffic_ops/app/lib/Fixtures/Deliveryservice.pm
+++ b/traffic_ops/app/lib/Fixtures/Deliveryservice.pm
@@ -37,6 +37,7 @@ my %definition_for = (
 			ccr_dns_ttl           => 3600,
 			global_max_mbps       => 0,
 			global_max_tps        => 0,
+			fq_pacing_rate        => 0,
 			long_desc             => 'test-ds1 long_desc',
 			long_desc_1           => 'test-ds1 long_desc_1',
 			long_desc_2           => 'test-ds1 long_desc_2',
@@ -76,6 +77,7 @@ my %definition_for = (
 			ccr_dns_ttl           => 3600,
 			global_max_mbps       => 0,
 			global_max_tps        => 0,
+			fq_pacing_rate        => 0,			
 			long_desc             => 'test-ds2 long_desc',
 			long_desc_1           => 'test-ds2 long_desc_1',
 			long_desc_2           => 'test-ds2 long_desc_2',
@@ -115,6 +117,7 @@ my %definition_for = (
 			ccr_dns_ttl           => 3600,
 			global_max_mbps       => 0,
 			global_max_tps        => 0,
+			fq_pacing_rate        => 0,			
 			long_desc             => 'test-ds3 long_desc',
 			long_desc_1           => 'test-ds3 long_desc_1',
 			long_desc_2           => 'test-ds3 long_desc_2',
@@ -154,6 +157,7 @@ my %definition_for = (
 			ccr_dns_ttl           => 3600,
 			global_max_mbps       => 0,
 			global_max_tps        => 0,
+			fq_pacing_rate        => 0,			
 			long_desc             => 'test-ds4 long_desc',
 			long_desc_1           => 'test-ds4 long_desc_1',
 			long_desc_2           => 'test-ds4 long_desc_2',
@@ -193,6 +197,7 @@ my %definition_for = (
 			ccr_dns_ttl           => 3600,
 			global_max_mbps       => 0,
 			global_max_tps        => 0,
+			fq_pacing_rate        => 0,			
 			long_desc             => 'test-ds5 long_desc',
 			long_desc_1           => 'test-ds5 long_desc_1',
 			long_desc_2           => 'test-ds5 long_desc_2',
@@ -232,6 +237,7 @@ my %definition_for = (
 			ccr_dns_ttl           => 3600,
 			global_max_mbps       => 0,
 			global_max_tps        => 0,
+			fq_pacing_rate        => 10,			
 			long_desc             => 'test-ds6 long_desc',
 			long_desc_1           => 'test-ds6 long_desc_1',
 			long_desc_2           => 'test-ds6 long_desc_2',
@@ -270,6 +276,7 @@ my %definition_for = (
 			ccr_dns_ttl           => 3600,
 			global_max_mbps       => 0,
 			global_max_tps        => 0,
+			fq_pacing_rate        => 5,			
 			long_desc             => 'steering-ds1 long_desc',
 			long_desc_1           => 'steering-ds1 long_desc_1',
 			long_desc_2           => 'steering-ds1 long_desc_2',
@@ -307,6 +314,7 @@ my %definition_for = (
 			ccr_dns_ttl           => 3600,
 			global_max_mbps       => 0,
 			global_max_tps        => 0,
+			fq_pacing_rate        => 0,			
 			long_desc             => 'steering-ds2 long_desc',
 			long_desc_1           => 'steering-ds2 long_desc_1',
 			long_desc_2           => 'steering-ds2 long_desc_2',
@@ -344,6 +352,7 @@ my %definition_for = (
 			ccr_dns_ttl           => 3600,
 			global_max_mbps       => 0,
 			global_max_tps        => 0,
+			fq_pacing_rate        => 0,			
 			long_desc             => 'new-steering-ds long_desc',
 			long_desc_1           => 'new-steering-ds long_desc_1',
 			long_desc_2           => 'new-steering-ds long_desc_2',
@@ -381,6 +390,7 @@ my %definition_for = (
 			ccr_dns_ttl           => 3600,
 			global_max_mbps       => 0,
 			global_max_tps        => 0,
+			fq_pacing_rate        => 0,			
 			long_desc             => 'target-ds1 long_desc',
 			long_desc_1           => 'target-ds1 long_desc_1',
 			long_desc_2           => 'target-ds1 long_desc_2',
@@ -418,6 +428,7 @@ my %definition_for = (
 			ccr_dns_ttl           => 3600,
 			global_max_mbps       => 0,
 			global_max_tps        => 0,
+			fq_pacing_rate        => 0,			
 			long_desc             => 'target-ds2 long_desc',
 			long_desc_1           => 'target-ds2 long_desc_1',
 			long_desc_2           => 'target-ds2 long_desc_2',
@@ -455,6 +466,7 @@ my %definition_for = (
 			ccr_dns_ttl           => 3600,
 			global_max_mbps       => 0,
 			global_max_tps        => 0,
+			fq_pacing_rate        => 0,			
 			long_desc             => 'target-ds3 long_desc',
 			long_desc_1           => 'target-ds3 long_desc_1',
 			long_desc_2           => 'target-ds3 long_desc_2',
@@ -492,6 +504,7 @@ my %definition_for = (
 			ccr_dns_ttl           => 3600,
 			global_max_mbps       => 0,
 			global_max_tps        => 0,
+			fq_pacing_rate        => 0,			
 			long_desc             => 'target-ds4 long_desc',
 			long_desc_1           => 'target-ds4 long_desc_1',
 			long_desc_2           => 'target-ds4 long_desc_2',
@@ -530,6 +543,7 @@ my %definition_for = (
 			ccr_dns_ttl           => 3600,
 			global_max_mbps       => 0,
 			global_max_tps        => 0,
+			fq_pacing_rate        => 0,			
 			long_desc             => 'test-ds1-root long_desc',
 			long_desc_1           => 'test-ds1-root long_desc_1',
 			long_desc_2           => 'test-ds1-root long_desc_2',
@@ -569,6 +583,7 @@ my %definition_for = (
 			ccr_dns_ttl           => 3600,
 			global_max_mbps       => 0,
 			global_max_tps        => 0,
+			fq_pacing_rate        => 0,			
 			long_desc             => 'foo.bar long_desc',
 			long_desc_1           => 'foo.bar long_desc_1',
 			long_desc_2           => 'foo.bar long_desc_2',
diff --git a/traffic_ops/app/lib/Fixtures/Integration/Deliveryservice.pm b/traffic_ops/app/lib/Fixtures/Integration/Deliveryservice.pm
index c88ac07db2..fc3de8ae0d 100644
--- a/traffic_ops/app/lib/Fixtures/Integration/Deliveryservice.pm
+++ b/traffic_ops/app/lib/Fixtures/Integration/Deliveryservice.pm
@@ -62,6 +62,7 @@ my %definition_for = (
 			profile                     => '8',
 			ssl_key_version             => '0',
 			global_max_tps              => '0',
+			fq_pacing_rate              => '0',
 			max_dns_answers             => '0',
 			tr_response_headers         => undef,
 			tenant_id                   => undef,
@@ -105,6 +106,7 @@ my %definition_for = (
 			cdn_id                      => '1',
 			global_max_mbps             => '0',
 			global_max_tps              => '0',
+			fq_pacing_rate              => '0',			
 			long_desc_2                 => 'test-ds3 long_desc_2',
 			origin_shield               => undef,
 			long_desc_1                 => 'test-ds3 long_desc_1',
@@ -160,6 +162,7 @@ my %definition_for = (
 			range_request_handling      => '0',
 			geo_limit                   => '0',
 			global_max_mbps             => '0',
+			fq_pacing_rate              => '0',			
 			long_desc_2                 => 'test-ds2 long_desc_2',
 			origin_shield               => undef,
 			max_dns_answers             => '0',
@@ -225,6 +228,7 @@ my %definition_for = (
 			tr_response_headers         => undef,
 			dns_bypass_cname            => undef,
 			global_max_tps              => '0',
+			fq_pacing_rate              => '7',			
 			long_desc_2                 => 'test-ds1 long_desc_2',
 			qstring_ignore              => '0',
 			tr_request_headers          => undef,
@@ -275,6 +279,7 @@ my %definition_for = (
 			edge_header_rewrite         => undef,
 			global_max_mbps             => '0',
 			global_max_tps              => '0',
+			fq_pacing_rate              => '0',			
 			http_bypass_fqdn            => '',
 			origin_shield               => undef,
 			tenant_id                   => undef,
@@ -308,6 +313,7 @@ my %definition_for = (
 			routing_name                => 'foo',
 			remap_text                  => undef,
 			global_max_mbps             => '0',
+			fq_pacing_rate              => '0',			
 			http_bypass_fqdn            => '',
 			miss_long                   => '-87.627778',
 			org_server_fqdn             => 'https://games.origin.kabletown.net',
@@ -358,6 +364,7 @@ my %definition_for = (
 			dscp                        => '40',
 			routing_name                => 'foo',
 			global_max_tps              => '0',
+			fq_pacing_rate              => '0',			
 			initial_dispersion          => '1',
 			multi_site_origin           => undef,
 			org_server_fqdn             => 'http://national-tv.origin.kabletown.net',
@@ -413,6 +420,7 @@ my %definition_for = (
 			dns_bypass_ip               => '',
 			dns_bypass_ttl              => undef,
 			global_max_tps              => '0',
+			fq_pacing_rate              => '1000000000',			
 			max_dns_answers             => '0',
 			regex_remap                 => undef,
 			remap_text                  => undef,
diff --git a/traffic_ops/app/lib/MojoPlugins/DeliveryService.pm b/traffic_ops/app/lib/MojoPlugins/DeliveryService.pm
index f9e6a538ce..64869520a8 100755
--- a/traffic_ops/app/lib/MojoPlugins/DeliveryService.pm
+++ b/traffic_ops/app/lib/MojoPlugins/DeliveryService.pm
@@ -55,12 +55,28 @@ sub register {
 			elsif ( $inp =~ /^(\d+)G$/ ) { return $1 * 1000; }
 			elsif ( $inp =~ /^(\d+)M$/ ) { return $1; }
 			elsif ( $inp =~ /^(\d+)k$/ ) { return int( $1 / 1000 ); }
-			elsif ( $inp =~ /^\d+$/ )    { return $1; }
+			elsif ( $inp =~ /^(\d+)$/  ) { return int( $1 / 1000000); }
 			else                         { return -1; }
 
 		}
 	);
 
+	$app->renderer->add_helper(
+		hr_string_to_bps => sub {
+			my $self = shift;
+			my $inp  = shift;
+
+			if    ( !defined($inp) )     { return 0; }                  # default is 0
+			elsif ( $inp =~ /^(\d+)T$/ ) { return $1 * 1000000000000; }
+			elsif ( $inp =~ /^(\d+)G$/ ) { return $1 * 1000000000; }
+			elsif ( $inp =~ /^(\d+)M$/ ) { return $1 * 1000000; }
+			elsif ( $inp =~ /^(\d+)k$/ ) { return $1 * 1000; }
+			elsif ( $inp =~ /^(\d+)$/  ) { return $1; }
+			else                         { return -1; }
+
+		}
+	);
+	
 	$app->renderer->add_helper(
 		is_delivery_service_assigned => sub {
 			my $self = shift || confess($no_instance_message);
diff --git a/traffic_ops/app/lib/Schema/Result/DeliveryServiceInfoForDomainList.pm b/traffic_ops/app/lib/Schema/Result/DeliveryServiceInfoForDomainList.pm
index 29754741fd..fe37913a97 100644
--- a/traffic_ops/app/lib/Schema/Result/DeliveryServiceInfoForDomainList.pm
+++ b/traffic_ops/app/lib/Schema/Result/DeliveryServiceInfoForDomainList.pm
@@ -48,6 +48,7 @@ SELECT
     deliveryservice.org_server_fqdn,
     deliveryservice.multi_site_origin,
     deliveryservice.range_request_handling,
+    deliveryservice.fq_pacing_rate,  
     deliveryservice.origin_shield,
     regex.pattern,
     retype.name AS re_type,
@@ -102,6 +103,7 @@ __PACKAGE__->add_columns(
 	"remap_text",                  { data_type => "varchar", is_nullable => 0, size => 2048 },
 	"protocol",                    { data_type => "tinyint", is_nullable => 0, size => 4 },
 	"range_request_handling",      { data_type => "tinyint", is_nullable => 0, size => 4 },
+	"fq_pacing_rate",              { data_type => "bigint",  is_nullable => 0 },   
 	"origin_shield",               { data_type => "varchar", is_nullable => 0, size => 1024 },
 	"profile",                     { data_type => "integer", is_nullable => 1},
 );
diff --git a/traffic_ops/app/lib/Schema/Result/DeliveryServiceInfoForServerList.pm b/traffic_ops/app/lib/Schema/Result/DeliveryServiceInfoForServerList.pm
index 239cc093c5..2d84155f25 100644
--- a/traffic_ops/app/lib/Schema/Result/DeliveryServiceInfoForServerList.pm
+++ b/traffic_ops/app/lib/Schema/Result/DeliveryServiceInfoForServerList.pm
@@ -48,6 +48,7 @@ SELECT
     deliveryservice.org_server_fqdn as org_server_fqdn,
     deliveryservice.multi_site_origin as multi_site_origin,
     deliveryservice.range_request_handling as range_request_handling,
+    deliveryservice.fq_pacing_rate as fq_pacing_rate,
     deliveryservice.origin_shield as origin_shield,
     regex.pattern AS pattern,
     retype.name AS re_type,
@@ -95,6 +96,7 @@ __PACKAGE__->add_columns(
 	"remap_text",                  { data_type => "varchar", is_nullable => 0, size => 2048 },
 	"protocol",                    { data_type => "tinyint", is_nullable => 0, size => 4 },
 	"range_request_handling",      { data_type => "tinyint", is_nullable => 0, size => 4 },
+        "fq_pacing_rate",              { data_type => "bigint",  is_nullable => 0},
 	"origin_shield",               { data_type => "varchar", is_nullable => 0, size => 1024 },
 	"profile",                     { data_type => "integer", is_nullable => 1},
 );
diff --git a/traffic_ops/app/lib/Schema/Result/Deliveryservice.pm b/traffic_ops/app/lib/Schema/Result/Deliveryservice.pm
index f40cd87ea8..32fbe15773 100644
--- a/traffic_ops/app/lib/Schema/Result/Deliveryservice.pm
+++ b/traffic_ops/app/lib/Schema/Result/Deliveryservice.pm
@@ -49,7 +49,6 @@ __PACKAGE__->table("deliveryservice");
 =head2 signing_algorithm
 
   data_type: 'deliveryservice_signature_type'
-  default_value: null
   is_nullable: 1
 
 =head2 qstring_ignore
@@ -139,7 +138,7 @@ __PACKAGE__->table("deliveryservice");
 =head2 max_dns_answers
 
   data_type: 'bigint'
-  default_value: 0
+  default_value: 5
   is_nullable: 1
 
 =head2 info_url
@@ -297,8 +296,13 @@ __PACKAGE__->table("deliveryservice");
 =head2 routing_name
 
   data_type: 'text'
-  default_value: 'ds'
-  is_nullable: 0
+  is_nullable: 1
+
+=head2 fq_pacing_rate
+
+  data_type: 'bigint'
+  default_value: 0
+  is_nullable: 1
 
 =cut
 
@@ -317,11 +321,7 @@ __PACKAGE__->add_columns(
   "dscp",
   { data_type => "bigint", is_nullable => 0 },
   "signing_algorithm",
-  {
-    data_type     => "deliveryservice_signature_type",
-    default_value => \"null",
-    is_nullable   => 1,
-  },
+  { data_type => "deliveryservice_signature_type", is_nullable => 1 },
   "qstring_ignore",
   { data_type => "smallint", is_nullable => 1 },
   "geo_limit",
@@ -355,7 +355,7 @@ __PACKAGE__->add_columns(
   "long_desc_2",
   { data_type => "text", is_nullable => 1 },
   "max_dns_answers",
-  { data_type => "bigint", default_value => 0, is_nullable => 1 },
+  { data_type => "bigint", default_value => 5, is_nullable => 1 },
   "info_url",
   { data_type => "text", is_nullable => 1 },
   "miss_lat",
@@ -418,7 +418,9 @@ __PACKAGE__->add_columns(
   "tenant_id",
   { data_type => "bigint", is_foreign_key => 1, is_nullable => 1 },
   "routing_name",
-  { data_type => "text", default_value => "ds", is_nullable => 0 },
+  { data_type => "text", is_nullable => 1 },
+  "fq_pacing_rate",
+  { data_type => "bigint", default_value => 0, is_nullable => 1 },
 );
 
 =head1 PRIMARY KEY
@@ -437,7 +439,7 @@ __PACKAGE__->set_primary_key("id", "type");
 
 =head1 UNIQUE CONSTRAINTS
 
-=head2 C<idx_140234_ds_id_unique>
+=head2 C<idx_89502_ds_id_unique>
 
 =over 4
 
@@ -447,9 +449,9 @@ __PACKAGE__->set_primary_key("id", "type");
 
 =cut
 
-__PACKAGE__->add_unique_constraint("idx_140234_ds_id_unique", ["id"]);
+__PACKAGE__->add_unique_constraint("idx_89502_ds_id_unique", ["id"]);
 
-=head2 C<idx_140234_ds_name_unique>
+=head2 C<idx_89502_ds_name_unique>
 
 =over 4
 
@@ -459,7 +461,7 @@ __PACKAGE__->add_unique_constraint("idx_140234_ds_id_unique", ["id"]);
 
 =cut
 
-__PACKAGE__->add_unique_constraint("idx_140234_ds_name_unique", ["xml_id"]);
+__PACKAGE__->add_unique_constraint("idx_89502_ds_name_unique", ["xml_id"]);
 
 =head1 RELATIONS
 
@@ -603,7 +605,7 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
-=head2 steering_target_deliveryservices_2s
+=head2 steering_target_targets
 
 Type: has_many
 
@@ -612,9 +614,9 @@ Related object: L<Schema::Result::SteeringTarget>
 =cut
 
 __PACKAGE__->has_many(
-  "steering_target_deliveryservices_2s",
+  "steering_target_targets",
   "Schema::Result::SteeringTarget",
-  { "foreign.deliveryservice" => "self.id" },
+  { "foreign.target" => "self.id" },
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
@@ -654,8 +656,8 @@ __PACKAGE__->belongs_to(
 );
 
 
-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-08-09 15:16:31
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FXNj6wNNq+jajg/rVqOSBw
+# Created by DBIx::Class::Schema::Loader v0.07047 @ 2018-01-17 19:59:17
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:soBlA2p3nlQoIGKkdDy8Zw
 
 # You can replace this text with custom code or comments, and it will be preserved on regeneration
 #
diff --git a/traffic_ops/app/lib/UI/DeliveryService.pm b/traffic_ops/app/lib/UI/DeliveryService.pm
index c9fac43758..7b8e761143 100644
--- a/traffic_ops/app/lib/UI/DeliveryService.pm
+++ b/traffic_ops/app/lib/UI/DeliveryService.pm
@@ -232,6 +232,7 @@ sub read {
 				"profile_description"         => $row->profile->description,
 				"global_max_mbps"             => $row->global_max_mbps,
 				"global_max_tps"              => $row->global_max_tps,
+				"fq_pacing_rate"              => $row->fq_pacing_rate,    
 				"edge_header_rewrite"         => $row->edge_header_rewrite,
 				"mid_header_rewrite"          => $row->mid_header_rewrite,
 				"tr_response_headers"         => $row->tr_response_headers,
@@ -497,6 +498,13 @@ sub check_deliveryservice_input {
 	{
 		$self->field('ds.global_max_tps')->is_equal( "", "Invalid global_max_tps (NaN)." );
 	}
+	if (   defined( $self->param('ds.fq_pacing_rate') )
+	        && $self->param('ds.fq_pacing_rate') ne "" )
+	{
+		if ( $self->hr_string_to_bps( $self->param('ds.fq_pacing_rate') ) < 0 ) {
+			$self->field('ds.fq_pacing_rate')->is_equal( "", "Invalid fq_pacing_rate (NaN)." );
+		}	    
+ 	}    	       
 
 	if ( $typename =~ /^DNS/ ) {
 		if ( defined( $self->param('ds.tr_response_headers') )
@@ -813,6 +821,7 @@ sub update {
 			profile                     => ($self->paramAsScalar('ds.profile') == -1) ? undef : $self->paramAsScalar('ds.profile'),
 			global_max_mbps             => $self->hr_string_to_mbps( $self->paramAsScalar( 'ds.global_max_mbps', 0 ) ),
 			global_max_tps              => $self->paramAsScalar( 'ds.global_max_tps', 0 ),
+			fq_pacing_rate              => $self->hr_string_to_bps( $self->paramAsScalar('ds.fq_pacing_rate', 0) ),
 			miss_lat                    => $self->paramAsScalar('ds.miss_lat'),
 			miss_long                   => $self->paramAsScalar('ds.miss_long'),
 			long_desc                   => $self->paramAsScalar('ds.long_desc'),
@@ -1051,6 +1060,7 @@ sub create {
 				profile                     => ($self->paramAsScalar('ds.profile') == -1) ? undef : $self->paramAsScalar('ds.profile'),
 				global_max_mbps             => $self->hr_string_to_mbps( $self->paramAsScalar( 'ds.global_max_mbps', 0 ) ),
 				global_max_tps              => $self->paramAsScalar( 'ds.global_max_tps', 0 ),
+				fq_pacing_rate              => $self->hr_string_to_bps($self->paramAsScalar('ds.fq_pacing_rate', 0)),
 				miss_lat                    => $self->paramAsScalar('ds.miss_lat'),
 				miss_long                   => $self->paramAsScalar('ds.miss_long'),
 				long_desc                   => $self->paramAsScalar('ds.long_desc'),
diff --git a/traffic_ops/app/t/deliveryservice.t b/traffic_ops/app/t/deliveryservice.t
index e580d2c436..6aa3277b2b 100644
--- a/traffic_ops/app/t/deliveryservice.t
+++ b/traffic_ops/app/t/deliveryservice.t
@@ -252,6 +252,7 @@ ok $t->post_ok(
 		'ds.global_max_mbps'             => '4T',
 		'ds.http_bypass_fqdn'            => '',
 		'ds.global_max_tps'              => '10001',
+		'ds.fq_pacing_rate'              => '500k',
 		'ds.info_url'                    => 'http://knutsel-update.com',
 		'ds.long_desc'                   => 'long_update',
 		'ds.long_desc_1'                 => 'cust_update',
@@ -306,6 +307,7 @@ ok $t->get_ok('/datadeliveryservice')->status_is(200)
   ->json_is( '/1/ccr_dns_ttl' => 3601 )
   ->json_is( '/1/global_max_mbps' => 4000000 )
   ->json_is( '/1/global_max_tps' => 10001 )
+  ->json_is( '/1/fq_pacing_rate' => 500000 )
   ->json_is( '/1/miss_lat' => '0' )
   ->json_is( '/1/miss_long' => '0' )
   ->json_is( '/1/long_desc' => 'long_update' )
diff --git a/traffic_ops/app/templates/delivery_service/_form.html.ep b/traffic_ops/app/templates/delivery_service/_form.html.ep
index 36cff33d05..512abebff0 100644
--- a/traffic_ops/app/templates/delivery_service/_form.html.ep
+++ b/traffic_ops/app/templates/delivery_service/_form.html.ep
@@ -399,6 +399,17 @@
 		%= field('ds.global_max_tps')->text(class => 'field', readonly => 'readonly');
 		<% }  %>
 	</div>
+	<div class="block form-row" id="fq_pacing_rate_row">
+		<% unless (field('ds.fq_pacing_rate')->valid) { %>
+			<span class="field-with-error"><%= field('ds.fq_pacing_rate')->error %></span>
+		<% } %>
+		%= label_for 'fq_pacing_rate' => 'Max Bytes per Second allowed per session (3000k or 5M are valid entries)', class => 'label'
+		<% if ($priv_level >= 20) { %>
+		%= field('ds.fq_pacing_rate')->text(class => 'field', id => 'fq_pacing_rate', name => 'ds.fq_pacing_rate');
+		<% } else { %>
+		%= field('ds.fq_pacing_rate')->text(class => 'field', readonly => 'readonly');
+		<% } %>
+	</div>	
 	<div class="block form-row" id="miss_lat_row">
 		<% unless (field('ds.miss_lat')->valid) { %>
 			<span class="field-with-error"><%= field('ds.miss_lat')->error %></span>
diff --git a/traffic_ops/app/templates/delivery_service/add.html.ep b/traffic_ops/app/templates/delivery_service/add.html.ep
index a04c525c44..f3ec29e67c 100644
--- a/traffic_ops/app/templates/delivery_service/add.html.ep
+++ b/traffic_ops/app/templates/delivery_service/add.html.ep
@@ -122,6 +122,7 @@
             $('#org_server_fqdn_row').show(speed);
             $('#global_max_mbps_row').show(speed);
             $('#global_max_tps_row').show(speed);
+            $('#fq_pacing_rate_row').show(speed);
             $('#miss_lat_row').show(speed);
             $('#miss_long_row').show(speed);
             $('#edge_header_rewrite_row').show(speed);
@@ -164,6 +165,7 @@
             $('#org_server_fqdn_row').show(speed);
             $('#global_max_mbps_row').show(speed);
             $('#global_max_tps_row').show(speed);
+            $('#fq_pacing_rate_row').show(speed);
             $('#miss_lat_row').show(speed);
             $('#miss_long_row').show(speed);
             $('#edge_header_rewrite_row').show(speed);
@@ -202,6 +204,7 @@
             $('#org_server_fqdn_row').hide(speed);
             $('#global_max_mbps_row').hide(speed);
             $('#global_max_tps_row').hide(speed);
+            $('#fq_pacing_rate_row').hide(speed);	
             $('#miss_lat_row').hide(speed);
             $('#miss_long_row').hide(speed);
             $('#edge_header_rewrite_row').hide(speed);
@@ -240,6 +243,7 @@
             $('#org_server_fqdn_row').hide(speed);
             $('#global_max_mbps_row').hide(speed);
             $('#global_max_tps_row').hide(speed);
+            $('#fq_pacing_rate_row').hide(speed);	
             $('#miss_lat_row').show(speed);
             $('#miss_long_row').show(speed);
             $('#edge_header_rewrite_row').hide(speed);
diff --git a/traffic_ops/app/templates/delivery_service/edit.html.ep b/traffic_ops/app/templates/delivery_service/edit.html.ep
index 4de0875506..9116ed4f68 100644
--- a/traffic_ops/app/templates/delivery_service/edit.html.ep
+++ b/traffic_ops/app/templates/delivery_service/edit.html.ep
@@ -216,6 +216,7 @@ function setup_form(speed) {
             $('#org_server_fqdn_row').show(speed);
             $('#global_max_mbps_row').show(speed);
             $('#global_max_tps_row').show(speed);
+            $('#fq_pacing_rate_row').show(speed);    
             $('#miss_lat_row').show(speed);
             $('#miss_long_row').show(speed);
             $('#edge_header_rewrite_row').show(speed);
@@ -256,6 +257,7 @@ function setup_form(speed) {
             $('#org_server_fqdn_row').show(speed);
             $('#global_max_mbps_row').show(speed);
             $('#global_max_tps_row').show(speed);
+            $('#fq_pacing_rate_row').show(speed);    
             $('#miss_lat_row').show(speed);
             $('#miss_long_row').show(speed);
             $('#edge_header_rewrite_row').show(speed);
@@ -294,6 +296,7 @@ function setup_form(speed) {
             $('#org_server_fqdn_row').hide(speed);
             $('#global_max_mbps_row').hide(speed);
             $('#global_max_tps_row').hide(speed);
+            $('#fq_pacing_rate_row').hide(speed);    
             $('#miss_lat_row').hide(speed);
             $('#miss_long_row').hide(speed);
             $('#edge_header_rewrite_row').hide(speed);
@@ -332,6 +335,7 @@ function setup_form(speed) {
             $('#org_server_fqdn_row').hide(speed);
             $('#global_max_mbps_row').hide(speed);
             $('#global_max_tps_row').hide(speed);
+            $('#fq_pacing_rate_row').hide(speed);    
             $('#miss_lat_row').show(speed);
             $('#miss_long_row').show(speed);
             $('#edge_header_rewrite_row').hide(speed);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services