-
Notifications
You must be signed in to change notification settings - Fork 112
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
Introduce edge gateway load balancers #223
Comments
Something worth thinking about: The advantage of this approach is that we can have a strict check on the needed components. Alternatively, we can implement these four components separately, but use them through a glue component |
I tend to think that it is better to split them:
That is true. But as elements (graph nodes) depend on each other, failure of one element would stop creating it's descendants.
I would say I've done a quick mockup with simply in-lining things which were referenced. This tends to become "beefy" and IMHO quite hard to comprehend (like a function with too many arguments) although I know that all the fields would not ever be used as some conflict with other. One more thought. If people want to abstract this stuff they can easily create Terraform module and refer it as a unit in other places. What others think? resource "vcd_lb" "one-resource" {
org = "my-org" # Optional
vdc = "my-org-vdc" # Optional
# Dependencies
edge_gateway = ""
### LB virtual server
enabled = "" # boolean
enable_acceleration = "" # boolean
name = ""
description = "" # optional
ip = "" # must be one of the networks attached to edge gateway
network = "" # because of IP address we may want/need to refer exact network
protocol = "" # HTTP, HTTPS, TCP, UDP
port = "" # port number to listen on
connection_limit = ""
connection_rate_limit = ""
application_profile {
name = ""
type = "" # TCP, UDP, HTTP, HTTPS
enable_ssl_passthrough = "" # if type=HTTPS
http_redirect_url = "" # string
persistence = "" # Source IP and , Cookie (MSRDP for type TCP)
cookie_name = "" # If persistence=Cookie
cookie_mode = "" # If persistence=Cookie
persistence_expiration_time = "" # time
insert_x_fotwarded_for_http_header = "" # boolean
enable_pool_side_ssl = "" # bool
# Only for type=HTTPS
virtual_server_certificates {
server_certificate = ""
ca_certificate = ""
crl = ""
}
# Only for enable_pool_side_ssl=true
pool_certificates {
server_certificate = ""
ca_certificate = ""
crl = ""
}
}
pool {
name = ""
description = ""
algorithm = "" # ROUND_ROBIN, IP_HASH, ...
transparent = "" # boolean
monitor {
name = ""
interval = ""
timeout = ""
max_retries = ""
type = "" # Better name could be ?protocol? or "protocol_type". HTTP, HTTPS, TCP, ICMP, or UDP
expected_response = "" # if type="HTTP" || type="HTTPS"
http_method = "" # if type="HTTP" || type="HTTPS" GET, POST, PUT, etc....
url = "" # if type="HTTP" || type="HTTPS"
send = "" # if type="HTTP" || type="HTTPS" || type="UDP"
receive = "" # if send != "" .Response from send. String to be matched in the response content.
# extension seems like very natural block with key/value, but needs further evaluation if key names would alway be compatible with terraform key naming
extension {
delay = "2" # Extension options listed https://docs.vmware.com/en/vCloud-Director/9.7/com.vmware.vcloud.spportal.doc/GUID-DE3EDF95-1A8E-4D2F-B7B1-1254E9420868.html
max-age = "10"
}
}
# Can such list of nested blocks be easily created with iteration using HCL?
# This nees to be friendly for population if one has resource vcd_vapp_vm with count>1
member {
name = ""
ip = ""
port = ""
monitor_port = ""
weight = ""
min_connections = ""
max_connections = ""
}
member {
name = ""
ip = ""
port = ""
monitor_port = ""
weight = ""
min_connections = ""
max_connections = ""
}
}
application_rule {
name = ""
script = ""
}
applcation_rule {
name = ""
script = ""
}
} |
Separate resources. |
If the virtual server resource can act as glue, thus checking that the needed components are set, let's implement them as separate ones. |
Load balancers are release in 2.4.0 |
Why
We have a need (#182) to introduce edge gateway load balancing capabilities.
Details
This is a master issue for work required to introduce Edge gateway load balancer (LB) support. Because this is a complex task and multiple resources will have to be created there will be child issues for each of the planned resources.
Prerequisites
Edge gateway services -> Load balancer -> Global configuration
). At the current state it is manual. Once we have ability to create it this would be a feature toggle attribute.Considerations
Proposal
The plan is to mimic Edge gateway UI in vCD. It has 6 tabs for configuration (one of them being just
enable/disable
which should happen on edge gateway resource once we have it). The other five are listed below. To make a working solution without manual intervention (provided edge gateway is created already) we need at least 4 of them.These objects reference each other to finally make a
virtual server
which is the main object for load balancer.Each of them is described well in the vCD Load Balancing documentation.
Sample HCL configuration
Testing considerations
To test load balancing we'd have to actually load balance some service and do HTTP calls to it. Therefore we need to be able to setup vApp with 2 VMs and launch a simple service (like http server). One option is that Photon OS has python3 by default and it allows to spawn a server with
python3 -m http.server
. The important part would be to setup a customization script and spawn such configs inside test.May be related for testing purpose: #139
References
Good read about LB options: https://docs.vmware.com/en/vCloud-Director/9.7/com.vmware.vcloud.spportal.doc/GUID-2E6696DB-5F03-411C-A7EA-358E50EBB992.html
The text was updated successfully, but these errors were encountered: