-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load balancing #5
Comments
1.Add new functions for comparing TfwStr with ANSI strings. 2. Extract TfwStr code to a separate .c file and cover it with unit tests. related to: #5 - Load balancing
- Scheduler modules are moved to sub-directories to group their files. - tfw_sched_match implements "prefix" and "equal" comparisons. - tfw_sched_match has a sysctl interface with a tiny config parser. Related to task: #5 - Load balancing
1.Add new functions for comparing TfwStr with ANSI strings. 2. Extract TfwStr code to a separate .c file and cover it with unit tests. related to: #5 - Load balancing
- Scheduler modules are moved to sub-directories to group their files. - tfw_sched_match implements "prefix" and "equal" comparisons. - tfw_sched_match has a sysctl interface with a tiny config parser. Related to task: #5 - Load balancing
This large commit is combined from a series of previous small commits that contain basic implementation for tfw_sched_http - the new rule-based scheduler. Changes overview: - Add simple unit testing framework. Tests run in kernel space in a separate module 'tfw_test'. - Extract TfwStr to a separate unit, implement matching functions, cover them with unit tests. - Extract TfwAddr to a separate unit, lib.c doesn't exist anymore. - Add http_match.c - the HTTP Request matching logic. - Add tfw_sched_http.c - the rule-based scheduler. related to: #5 - Load balancing
TBD:
|
The change introduces a small set of parallel connections to each TfwServer. They are switched in a round-robin manner when a message is scheduled. When a connection is closed, another is chosen and the closed one is re-connected in background. Also many connections per server implies that TfwSession doesn't link TfwClient and TfwServer anymore. Instead, it links client/server sockets. Related to: #5 - load balancing
The commit introduces two major things: 1. The HTTP parser is now able to parse the X-Forwarded-For header and put it to the headers table, although t doesn't parse IP addresses or distinct Node IDs yet. 2. Client's IP address is added to X-Forwarded-For header of each forwarded HTTP request. If there is no such header - it is created, if it is already there, then the client's IP is appended to the list. Also the commit contains fixes for the HTTP parser that used to crop parsed HTTP headers and write them into each other's locations in the headers table. Related to: #5 - Load Balancing
The commit introduces two major things: 1. The HTTP parser is now able to parse the X-Forwarded-For header and put it to the headers table, although t doesn't parse IP addresses or distinct Node IDs yet. 2. Client's IP address is added to X-Forwarded-For header of each forwarded HTTP request. If there is no such header - it is created, if it is already there, then the client's IP is appended to the list. Also the commit contains fixes for the HTTP parser that used to crop parsed HTTP headers and write them into each other's locations in the headers table. Related to: #5 - Load Balancing
tfw_sched_hash must be updated by Rendezvous hashing (http://en.wikipedia.org/wiki/Rendezvous_hashing) for backend servers failover. |
It seems this part of the task "Failovering over backend nodes also must be implemented. See HAProxy" is not implemented. We need backup nodes in HAProxy terms WAF installations. The typical installation is Tempesta balances traffic among WAF servers and does preliminary filtering and the whole cluster DDoS protection. WAF nodes do high-level heavy weight filtering and pass the traffic to web servers. However, if WAF nodes fail, then Tempesta must bypass traffic directly to backend Web-servers, but it must not send any traffic to the servers in normal circumstances. |
Removed pfl optimization __lookup_pgfrag_room After analyzing perfstat and benchmarks we came to the conclusion, that pfl not working as expected and looks like overengineering. The most optimistic case of observer results(Response 128KB): SS pfl hits : 2969144 SS pfl misses : 3944903 * Removed pfl statistics * Added patch from PR #5 and removed unnecessary initializations
Following
sched
modules must be implemented:See Nginx load balancing as an example.
The system must ensure that only one shceduler module can be loaded by a user.
Tempesta must add X-Forwarded-For HTTP header with the client IP address to forwarded to backed server request.
Failovering over backend nodes also must be implemented. See HAProxy
The text was updated successfully, but these errors were encountered: