A brief file description. More...
#include "libts.h"
#include "P_EventSystem.h"
#include "ControlBase.h"
#include "ControlMatcher.h"
#include "CongestionStats.h"
Go to the source code of this file.
Data Structures | |
struct | CongestionControlRule |
class | CongestionControlRecord |
struct | FailHistory |
struct | CongestionEntry |
Defines | |
#define | CONGESTION_EVENT_CONGESTED_ON_M (CONGESTION_EVENT_EVENTS_START + 1) |
#define | CONGESTION_EVENT_CONGESTED_ON_F (CONGESTION_EVENT_EVENTS_START + 2) |
#define | CONGESTION_EVENT_CONGESTED_LIST_DONE (CONGESTION_EVENT_EVENTS_START + 3) |
#define | CONGESTION_EVENT_CONTROL_LOOKUP_DONE (CONGESTION_EVENT_EVENTS_START + 4) |
#define | CONG_HIST_ENTRIES 17 |
Typedefs | |
typedef unsigned short | cong_hist_t |
Enumerations | |
enum | { PER_IP, PER_HOST } |
Functions | |
void | initCongestionControl () |
CongestionControlRecord * | CongestionControlled (RequestData *rdata) |
uint64_t | make_key (char *hostname, int len, sockaddr const *ip, CongestionControlRecord *record) |
uint64_t | make_key (char *hostname, sockaddr const *ip, CongestionControlRecord *record) |
uint64_t | make_key (char *hostname, int len, sockaddr const *ip, char *prefix, int prelen, short port=0) |
Action * | get_congest_entry (Continuation *cont, HttpRequestData *data, CongestionEntry **ppEntry) |
Action * | get_congest_list (Continuation *cont, MIOBuffer *buffer, int format) |
void | remove_congested_entry (uint64_t key) |
void | remove_all_congested_entry (void) |
void | remove_congested_entry (char *buf, MIOBuffer *out_buffer) |
Variables | |
InkRand | CongestionRand |
int | congestionControlEnabled |
int | congestionControlLocalTime |
A brief file description.
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.
Definition in file Congestion.h.
#define CONG_HIST_ENTRIES 17 |
Definition at line 172 of file Congestion.h.
Referenced by FailHistory::get_bin_events(), FailHistory::init(), and FailHistory::regist_event().
#define CONGESTION_EVENT_CONGESTED_LIST_DONE (CONGESTION_EVENT_EVENTS_START + 3) |
Definition at line 42 of file Congestion.h.
Referenced by CongestionDBCont::get_congest_list().
#define CONGESTION_EVENT_CONGESTED_ON_F (CONGESTION_EVENT_EVENTS_START + 2) |
Definition at line 41 of file Congestion.h.
Referenced by HttpSM::do_http_server_open(), HttpDebugNames::get_event_name(), HttpSM::state_http_server_open(), and HttpSM::state_raw_http_server_open().
#define CONGESTION_EVENT_CONGESTED_ON_M (CONGESTION_EVENT_EVENTS_START + 1) |
Definition at line 40 of file Congestion.h.
Referenced by HttpSM::do_http_server_open(), HttpDebugNames::get_event_name(), HttpSM::state_http_server_open(), and HttpSM::state_raw_http_server_open().
#define CONGESTION_EVENT_CONTROL_LOOKUP_DONE (CONGESTION_EVENT_EVENTS_START + 4) |
Definition at line 43 of file Congestion.h.
Referenced by CongestionDBCont::get_congest_entry(), and HttpSM::state_congestion_control_lookup().
typedef unsigned short cong_hist_t |
Definition at line 171 of file Congestion.h.
anonymous enum |
Definition at line 49 of file Congestion.h.
CongestionControlRecord* CongestionControlled | ( | RequestData * | rdata | ) |
Definition at line 418 of file Congestion.cc.
References congestionControlEnabled, ControlMatcher< Data, Result >::Match(), CongestionControlRecord::pRecord, and CongestionControlRule::record.
Referenced by get_congest_entry(), and CongestionEntry::validate().
Action* get_congest_entry | ( | Continuation * | cont, | |
HttpRequestData * | data, | |||
CongestionEntry ** | ppEntry | |||
) |
Definition at line 468 of file CongestionDB.cc.
Referenced by HttpSM::do_congestion_control_lookup().
Action* get_congest_list | ( | Continuation * | cont, | |
MIOBuffer * | buffer, | |||
int | format | |||
) |
Definition at line 521 of file CongestionDB.cc.
void initCongestionControl | ( | ) |
Definition at line 356 of file Congestion.cc.
References CongestionControlDefaultSchemeChanged(), congestionControlEnabled, CongestionControlEnabledChanged(), congestionControlLocalTime, CongestionControlUpdate, Debug, DEFAULT_client_wait_interval, DEFAULT_congestion_scheme_str, DEFAULT_dead_os_conn_retries, DEFAULT_dead_os_conn_timeout, DEFAULT_error_page, DEFAULT_fail_window, DEFAULT_live_os_conn_retries, DEFAULT_live_os_conn_timeout, DEFAULT_max_connection, DEFAULT_max_connection_failures, DEFAULT_proxy_retry_interval, DEFAULT_wait_interval_alpha, init_CongestionRegressionTest(), ink_assert, REC_EstablishStaticConfigInt32, REC_EstablishStaticConfigStringAlloc, RecData::rec_int, RECD_NULL, CongestionMatcherTable::reconfigure(), RecRegisterConfigUpdateCb(), and register_congest_stats().
Referenced by main().
uint64_t make_key | ( | char * | hostname, | |
sockaddr const * | ip, | |||
CongestionControlRecord * | record | |||
) |
Definition at line 433 of file Congestion.cc.
References make_key().
Referenced by CCCongestionDBTestCont::gen_CongestionEntry(), get_congest_entry(), make_key(), remove_congested_entry(), and CongestionEntry::validate().
uint64_t make_key | ( | char * | hostname, | |
int | len, | |||
sockaddr const * | ip, | |||
char * | prefix, | |||
int | prelen, | |||
short | port = 0 | |||
) |
Definition at line 466 of file Congestion.cc.
References ats_ip_addr8_cast(), ats_ip_addr_size(), ink_code_incr_md5_final(), ink_code_incr_md5_init(), and ink_code_incr_md5_update().
uint64_t make_key | ( | char * | hostname, | |
int | len, | |||
sockaddr const * | ip, | |||
CongestionControlRecord * | record | |||
) |
Definition at line 443 of file Congestion.cc.
References ats_ip_addr8_cast(), ats_ip_addr_size(), CongestionControlRecord::congestion_scheme, ink_code_incr_md5_final(), ink_code_incr_md5_init(), ink_code_incr_md5_update(), PER_HOST, CongestionControlRecord::port, CongestionControlRecord::prefix, and CongestionControlRecord::prefix_len.
void remove_all_congested_entry | ( | void | ) |
Definition at line 565 of file CongestionDB.cc.
Referenced by remove_congested_entry().
void remove_congested_entry | ( | char * | buf, | |
MIOBuffer * | out_buffer | |||
) |
Definition at line 591 of file CongestionDB.cc.
void remove_congested_entry | ( | uint64_t | key | ) |
Definition at line 573 of file CongestionDB.cc.
Referenced by remove_congested_entry().
Definition at line 93 of file Congestion.cc.
Referenced by CongestionControlEnabledChanged(), CongestionControlled(), CongestionDBCont::GC(), get_congest_entry(), get_congest_list(), initCongestionControl(), CongestionMatcherTable::reconfigure(), and HttpSM::set_next_state().
Definition at line 94 of file Congestion.cc.
Referenced by initCongestionControl(), and CongestionEntry::sprint().