ข้ามไปยังเนื้อหา

การปรับปรุง HTTP LoadBalancer

เมทาดาทาการเพิ่มประสิทธิภาพสำหรับสคีมา HTTP load balancer ดู OpenAPI Extensions สำหรับคำจำกัดความของส่วนขยาย

สคีมาทั้งหมดที่ตรงกับ viewshttp_loadbalancer.*SpecType จะได้รับการเพิ่มประสิทธิภาพ:

  • viewshttp_loadbalancerCreateSpecType
  • viewshttp_loadbalancerReplaceSpecType
  • viewshttp_loadbalancerGetSpecType

ส่วนขยาย x-f5xc-minimum-configuration ให้เมทาดาทา CLI ที่ครอบคลุมสำหรับการสร้าง HTTP load balancer ที่ใช้งานได้ขั้นต่ำ

ฟิลด์ข้อจำกัดคำอธิบาย
metadata.nameรูปแบบ DNS label: [a-z0-9]([-a-z0-9]*[a-z0-9])?ชื่อทรัพยากร
metadata.namespaceรูปแบบ DNS labelNamespace
spec.domainsArray, min_items: 1โดเมนที่ให้บริการ

ต้องระบุประเภท load balancer หนึ่งในต่อไปนี้:

ตัวแปรคำอธิบาย
spec.httpHTTP เท่านั้น
spec.httpsHTTPS พร้อมใบรับรองแบบ manual
spec.https_auto_certHTTPS พร้อมใบรับรองอัตโนมัติ
spec.http_httpsทั้ง HTTP และ HTTPS

หมายเหตุ: กลุ่ม OneOf ของประเภท load balancer ถูกอ้างถึงในชื่อ:

  • lb_type ในไฟล์การกำหนดค่า (รูปแบบย่อใน config/minimum_configs.yaml)
  • loadbalancer_type ในส่วนขยาย native ของ OpenAPI spec (ชื่อฟิลด์ native)

การอ้างอิงสคีมา API: x-ves-oneof-field-loadbalancer_type: ["http", "https", "https_auto_cert", "http_https"]

{
"metadata": {
"name": "example-app",
"namespace": "default"
},
"spec": {
"domains": ["example.com"],
"https_auto_cert": {
"port": 443,
"tls_config": {"default_security": {}}
},
"advertise_on_public_default_vip": {},
"routes": [{"prefix": "/", "origin_pool": {"pool_name": "backend-pool"}}]
}
}

ฟิลด์ที่มีเครื่องหมาย x-f5xc-server-default: true จะมีค่า default ถูกนำไปใช้โดย F5 XC API server เมื่อไม่ได้ระบุในคำขอ HTTP load balancer มีค่าเริ่มต้นที่เซิร์ฟเวอร์กำหนดจำนวนมาก เนื่องจากฟีเจอร์ความปลอดภัยและตัวเลือกโปรโตคอลส่วนใหญ่จะมีค่าเริ่มต้นเป็นสถานะปิดการใช้งานหรือสถานะที่ปลอดภัย

เมื่อระบุ https_auto_cert เซิร์ฟเวอร์จะนำค่าเริ่มต้นเหล่านี้ไปใช้กับฟิลด์ที่ไม่ได้ระบุ:

ฟิลด์ค่าเริ่มต้นประเภทคำอธิบาย
port443integerพอร์ต HTTPS สำหรับรับฟัง
http_redirectfalsebooleanการเปลี่ยนเส้นทาง HTTP ไปยัง HTTPS
add_hstsfalsebooleanส่วนหัว HTTP Strict Transport Security
tls_config.default_security{}objectTLS 1.2+ พร้อม cipher ที่แข็งแกร่ง
no_mtls{}objectปิดการใช้งาน Mutual TLS
default_header{}objectการจัดการส่วนหัวชื่อเซิร์ฟเวอร์เริ่มต้น
enable_path_normalize{}objectเปิดใช้งานการทำให้พาธเป็นมาตรฐาน
default_loadbalancer{}objectการตั้งค่า load balancer เริ่มต้น
header_transformation_type.legacy_header_transformation{}objectการแปลงส่วนหัวแบบเดิม
connection_idle_timeout120000integerการหมดเวลาเชื่อมต่อในหน่วยมิลลิวินาที (2 นาที)
http_protocol_options.http_protocol_enable_v1_v2{}objectเปิดใช้งาน HTTP/1.1 และ HTTP/2
coalescing_options.default_coalescing{}objectการรวม HTTP/2 connection เริ่มต้น

ฟีเจอร์ความปลอดภัยทั้งหมดจะมีค่าเริ่มต้นเป็นปิดการใช้งานเมื่อไม่ได้ระบุ:

ฟิลด์ค่าเริ่มต้นคำอธิบาย
disable_waf{}ปิดการใช้งาน ไฟร์วอลล์แอปเว็บ (WAF)
disable_bot_defense{}ปิดการใช้งานการป้องกัน Bot
disable_rate_limit{}ปิดการใช้งานการจำกัดอัตรา
disable_api_discovery{}ปิดการใช้งานการค้นพบ API
disable_api_testing{}ปิดการใช้งานการทดสอบ API
disable_api_definition{}ปิดการใช้งานคำนิยาม API
disable_malware_protection{}ปิดการใช้งานการป้องกันมัลแวร์
disable_client_side_defense{}ปิดการใช้งานการป้องกันฝั่งไคลเอนต์
disable_ip_reputation{}ปิดการใช้งาน IP reputation
disable_threat_mesh{}ปิดการใช้งาน threat mesh
disable_malicious_user_detection{}ปิดการใช้งานการตรวจจับผู้ใช้ที่เป็นอันตราย

ค่าเริ่มต้นการป้องกัน DDoS และการควบคุมการเข้าถึง

หัวข้อที่มีชื่อว่า “ค่าเริ่มต้นการป้องกัน DDoS และการควบคุมการเข้าถึง”
ฟิลด์ค่าเริ่มต้นคำอธิบาย
l7_ddos_protection.mitigation_block{}บล็อกทราฟฟิก DDoS (การดำเนินการลดความเสี่ยงเริ่มต้น)
l7_ddos_protection.default_rps_threshold{}ใช้เกณฑ์ RPS เริ่มต้น
l7_ddos_protection.clientside_action_none{}ไม่มีการตรวจสอบ DDoS ฝั่งไคลเอนต์
l7_ddos_protection.ddos_policy_none{}ไม่มีการอ้างอิงนโยบาย DDoS
no_challenge{}ไม่มีการท้าทายไคลเอนต์
user_id_client_ip{}ระบุผู้ใช้ด้วย client IP
disable_trust_client_ip_headers{}ไม่เชื่อถือส่วนหัว client IP
ฟิลด์ค่าเริ่มต้นประเภทคำอธิบาย
advertise_on_public_default_vip{}objectโฆษณาบน public VIP เริ่มต้น
round_robin{}objectอัลกอริทึม load balancing แบบ round-robin
add_locationtruebooleanเพิ่มส่วนหัว location ในการตอบสนอง
system_default_timeouts{}objectใช้การหมดเวลาเริ่มต้นของระบบ
service_policies_from_namespace{}objectรับนโยบายบริการจาก namespace
default_sensitive_data_policy{}objectใช้นโยบายข้อมูลที่ละเอียดอ่อนเริ่มต้น

ฟิลด์ที่มีเครื่องหมาย x-f5xc-conflicts-with บ่งชี้รูปแบบ OneOf สามารถระบุได้เพียงหนึ่งฟิลด์จากแต่ละกลุ่ม

ชื่อกลุ่มฟิลด์คำอธิบาย
lb_typehttp, https, https_auto_cert, http_httpsประเภทโปรโตคอล load balancer
advertisingadvertise_on_public_default_vip, advertise_on_public, advertise_custom, do_not_advertiseวิธีการโฆษณา load balancer
load_balancing_algorithmround_robin, least_request, ring_hash, randomอัลกอริทึมการกระจายทราฟฟิก
ชื่อกลุ่มฟิลด์คำอธิบาย
tls_configdefault_security, medium_security, low_security, custom_securityระดับความปลอดภัย TLS
mtlsno_mtls, use_mtlsเปิดหรือปิดการใช้งาน Mutual TLS
ชื่อกลุ่มฟิลด์คำอธิบาย
http_protocolhttp_protocol_enable_v1_only, http_protocol_enable_v1_v2, http_protocol_enable_v2_onlyเวอร์ชันโปรโตคอล HTTP
header_transformationlegacy_header_transformation, proper_header_transformation, preserve_case_header_transformationประเภทการแปลงส่วนหัว HTTP
server_name_headerdefault_header, append_server_name_header, pass_through_server_name_headerการจัดการส่วนหัวชื่อเซิร์ฟเวอร์
ชื่อกลุ่มฟิลด์คำอธิบาย
path_normalizeenable_path_normalize, disable_path_normalizeเปิดหรือปิดการทำให้พาธเป็นมาตรฐาน
loadbalancer_choicenon_default_loadbalancer, default_loadbalancerload balancer เริ่มต้นหรือไม่ใช่เริ่มต้น
coalescingdefault_coalescing, disable_coalescing, enable_for_same_originตัวเลือกการรวม HTTP/2 connection
ชื่อกลุ่มฟิลด์คำอธิบาย
wafdisable_waf, enable_wafไฟร์วอลล์แอปเว็บ (WAF)
bot_defensedisable_bot_defense, enable_bot_defenseการตรวจจับและลดความเสี่ยงของ Bot
rate_limitdisable_rate_limit, enable_rate_limitการจำกัดอัตรา
api_discoverydisable_api_discovery, enable_api_discoveryการค้นพบ API
api_testingdisable_api_testing, enable_api_testingการทดสอบ API
api_definitiondisable_api_definition, enable_api_definitionคำนิยาม API
malware_protectiondisable_malware_protection, enable_malware_protectionการป้องกันมัลแวร์
client_side_defensedisable_client_side_defense, enable_client_side_defenseการป้องกันฝั่งไคลเอนต์
ip_reputationdisable_ip_reputation, enable_ip_reputationIP reputation
threat_meshdisable_threat_mesh, enable_threat_meshThreat mesh
malicious_user_detectiondisable_malicious_user_detection, enable_malicious_user_detectionการตรวจจับผู้ใช้ที่เป็นอันตราย
ชื่อกลุ่มฟิลด์คำอธิบาย
ddos_mitigationmitigation_block, mitigation_challenge, mitigation_noneการดำเนินการลดความเสี่ยง DDoS
ddos_rps_thresholddefault_rps_threshold, custom_rps_thresholdเกณฑ์คำขอต่อวินาที
ddos_clientside_actionclientside_action_none, clientside_action_javascript, clientside_action_captchaการดำเนินการตรวจสอบ DDoS ฝั่งไคลเอนต์
ddos_policyddos_policy_none, ddos_policy_refการอ้างอิงนโยบาย DDoS หรือไม่มี
ชื่อกลุ่มฟิลด์คำอธิบาย
challengeno_challenge, js_challenge, captcha_challengeประเภทการท้าทายไคลเอนต์สำหรับการตรวจจับ Bot
user_identificationuser_id_client_ip, user_identificationวิธีการระบุผู้ใช้
client_ip_headersdisable_trust_client_ip_headers, enable_trust_client_ip_headersเชื่อถือส่วนหัว client IP หรือไม่
timeoutssystem_default_timeouts, custom_timeoutsใช้การหมดเวลาเริ่มต้นของระบบหรือกำหนดเอง
service_policies_sourceservice_policies_from_namespace, active_service_policiesนโยบายบริการจาก namespace หรือรายการที่ใช้งาน
sensitive_data_policydefault_sensitive_data_policy, custom_sensitive_data_policyใช้นโยบายข้อมูลที่ละเอียดอ่อนเริ่มต้นหรือกำหนดเอง

สถานะ: ยังไม่ได้นำไปใช้กับสคีมา http_loadbalancer

ต่างจาก healthcheck ที่รวม x-f5xc-recommended-oneof-variant เพื่อบ่งชี้ตัวเลือกที่พบบ่อยที่สุดสำหรับกลุ่ม OneOf ปัจจุบัน http_loadbalancer ยังขาดส่วนขยายนี้

Healthcheck (นำไปใช้แล้ว):

viewshealthcheckCreateSpecType:
x-f5xc-recommended-oneof-variant:
health_check: "http_health_check"

HTTP LoadBalancer (ยังไม่ได้นำไปใช้):

viewshttp_loadbalancerCreateSpecType:
x-f5xc-recommended-oneof-variant: null # Would indicate recommended lb_type variant

ในการเพิ่มส่วนขยายนี้สำหรับ http_loadbalancer:

  1. สังเกตการเลือกค่าเริ่มต้นของ F5 XC console (เช่น lb_type ใดที่ถูกเลือกไว้ล่วงหน้าในส่วนติดต่อผู้ใช้)
  2. เพิ่มการกำหนดค่าใน config/discovered_defaults.yaml
  3. รันไปป์ไลน์การเพิ่มประสิทธิภาพใหม่เพื่อนำส่วนขยายไปใช้

โครงสร้างที่คาดหวังเมื่อเพิ่มแล้ว:

viewshttp_loadbalancerCreateSpecType:
x-f5xc-recommended-oneof-variant:
loadbalancer_type: "https_auto_cert" # Example - requires verification

ส่วนขยายนี้จะช่วยให้เครื่องมือปลายทางสามารถเลือกตัวแปรที่ใช้บ่อยที่สุดไว้ล่วงหน้าเมื่อนำเสนอตัวเลือกการกำหนดค่าแก่ผู้ใช้

ฟิลด์ที่มีเครื่องหมาย x-f5xc-constraints รวมถึงข้อจำกัดการตรวจสอบที่ค้นพบจากการวิเคราะห์ API

ฟิลด์minItemsmaxItemsuniqueItems
spec.domains1-false
spec.routes1256false
spec.blocked_clients1128true
spec.trusted_clients1128true
spec.data_guard_rules1256true
ฟิลด์ค่าต่ำสุดค่าสูงสุดค่าเริ่มต้นคำอธิบาย
spec.https_auto_cert.port165535443หมายเลขพอร์ต HTTPS
spec.https_auto_cert.connection_idle_timeout10003600000120000การหมดเวลาเชื่อมต่อ (มิลลิวินาที, 1 วินาที ถึง 1 ชั่วโมง)
ฟิลด์ค่าค่าเริ่มต้นคำอธิบาย
spec.https_auto_cert.tls_configdefault_security, medium_security, low_security, custom_securitydefault_securityระดับความปลอดภัย TLS
spec.https_auto_cert.header_transformation_typelegacy_header_transformation, proper_header_transformation, preserve_case_header_transformationlegacy_header_transformationการแปลงส่วนหัว HTTP
spec.https_auto_cert.http_protocol_optionshttp_protocol_enable_v1_only, http_protocol_enable_v1_v2, http_protocol_enable_v2_onlyhttp_protocol_enable_v1_v2เวอร์ชันโปรโตคอล HTTP
spec.https_auto_cert.coalescing_optionsdefault_coalescing, disable_coalescing, enable_for_same_origindefault_coalescingการรวม HTTP/2 connection
spec.load_balancing_algorithmround_robin, least_request, ring_hash, randomround_robinอัลกอริทึม load balancing
spec.l7_ddos_protection.mitigationmitigation_block, mitigation_challenge, mitigation_nonemitigation_blockการดำเนินการลดความเสี่ยง DDoS Layer 7
spec.l7_ddos_protection.rps_thresholddefault_rps_threshold, custom_rps_thresholddefault_rps_thresholdเกณฑ์ RPS สำหรับการตรวจจับ DDoS
spec.l7_ddos_protection.clientside_actionclientside_action_none, clientside_action_javascript, clientside_action_captchaclientside_action_noneการตรวจสอบ DDoS ฝั่งไคลเอนต์
spec.challengeno_challenge, js_challenge, captcha_challengeno_challengeประเภทการท้าทายไคลเอนต์
spec.advertisingadvertise_on_public_default_vip, advertise_on_public, advertise_custom, do_not_advertiseadvertise_on_public_default_vipการโฆษณา load balancer

ไปป์ไลน์การเพิ่มประสิทธิภาพเพิ่มเมทาดาทา x-f5xc-guided-workflows ในระดับ spec เวิร์กโฟลว์เหล่านี้ให้คำแนะนำการปรับใช้แบบทีละขั้นตอนที่ใช้โดย AI assistant และเครื่องมือ CLI

เวิร์กโฟลว์ 5 ขั้นตอนสำหรับการสร้าง HTTP load balancer ที่กำหนดค่าครบถ้วนพร้อม backend origin pool (กำหนดใน config/guided_workflows.yaml):

ขั้นตอนการดำเนินการทรัพยากรฟิลด์ที่จำเป็นไม่บังคับ
1สร้าง Origin Poolorigin_poolname, origin_servers, portไม่
2กำหนดค่า Health Checkhealthcheckname, http_health_checkใช่
3แนบ Health Check--ใช่
4สร้าง HTTP Load Balancerhttp_loadbalancername, domains, http.portไม่
5ตรวจสอบการปรับใช้--ไม่

ข้อกำหนดเบื้องต้น: Namespace ที่ถูกต้องใน tenant เป้าหมาย, แอปพลิเคชัน backend ที่เข้าถึงได้ผ่าน IP หรือ DNS, ใบรับรอง SSL (ไม่บังคับสำหรับ HTTPS)

เวิร์กโฟลว์ 7 ขั้นตอนสำหรับการสร้าง HTTPS load balancer พร้อมการยุติการเชื่อมต่อ SSL/TLS:

ขั้นตอนการดำเนินการทรัพยากรฟิลด์ที่จำเป็นไม่บังคับ
1อัปโหลดใบรับรอง SSLcertificatename, certificate_chain, private_keyไม่
2สร้าง Origin Poolorigin_poolname, origin_serversไม่
3กำหนดค่า Health Checkhealthcheck-ใช่
4กำหนดค่านโยบาย WAFapp_firewall-ใช่
5สร้าง HTTPS Load Balancerhttp_loadbalancername, domains, https.tls_parametersไม่
6แนบนโยบาย WAF--ใช่
7ตรวจสอบการปรับใช้ HTTPS--ไม่

ข้อกำหนดเบื้องต้น: Namespace ที่ถูกต้องใน tenant เป้าหมาย, ใบรับรอง SSL และ private key, แอปพลิเคชัน backend ที่เข้าถึงได้

เครื่องมือปลายทางใช้เวิร์กโฟลว์เหล่านี้เพื่อแนะนำผู้ใช้ผ่านการปรับใช้หลายขั้นตอน:

  • xcsh CLI: นำเสนอเวิร์กโฟลว์เป็นคำสั่งแนะนำแบบโต้ตอบ (เช่น xcsh deploy http-lb)
  • VS Code ส่วนขยาย: แสดงขั้นตอนเวิร์กโฟลว์ในแผงด้านข้างพร้อมการติดตามความคืบหน้า
  • AI assistant: ทำตามขั้นตอนเวิร์กโฟลว์ตามลำดับ สร้างแต่ละทรัพยากรและตรวจสอบการพึ่งพา

ส่วนขยาย vendor เหล่านี้ถูกเพิ่มในสคีมา OpenAPI มาตรฐานเพื่อถ่ายทอดเมทาดาทาเฉพาะของ F5 XC

ประเภท: string

บ่งชี้การจำแนกโดเมนสำหรับการจัดระเบียบ CLI และเครื่องมือ

viewshttp_loadbalancerCreateSpecType:
type: object
x-f5xc-cli-domain: "virtual"

ประเภท: object

ให้เมทาดาทาที่ครอบคลุมสำหรับการสร้างการกำหนดค่าที่ใช้งานได้ขั้นต่ำ รวมถึง:

  • คำอธิบาย
  • ฟิลด์ที่จำเป็นพร้อมข้อจำกัด
  • กลุ่มที่ใช้พร้อมกันไม่ได้
  • ตัวอย่างการกำหนดค่า (YAML, JSON)
  • ตัวอย่างคำสั่ง curl
viewshttp_loadbalancerCreateSpecType:
type: object
x-f5xc-minimum-configuration:
description: "HTTP/HTTPS load balancer for distributing traffic across origin pools"
required_fields:
- "metadata.name"
- "metadata.namespace"
- "spec.domains"
mutually_exclusive_groups:
- name: "lb_type"
fields: ["spec.http", "spec.https", "spec.https_auto_cert", "spec.http_https"]
reason: "Choose exactly one load balancer type"
example_yaml: |
...
example_json: |
...
example_curl: |
...

ประเภท: boolean

เมื่อเป็น true บ่งชี้ว่าค่า default ที่ระบุถูกบังคับใช้โดย F5 XC API server ฟิลด์ที่มีส่วนขยายนี้สามารถละไว้ในคำขอ API ได้อย่างปลอดภัย — เซิร์ฟเวอร์จะนำค่าเริ่มต้นไปใช้โดยอัตโนมัติ

disable_waf:
type: object
default: {}
x-f5xc-server-default: true

ประเภท: array of strings

แสดงรายชื่อฟิลด์ที่ใช้พร้อมกันไม่ได้กับฟิลด์ปัจจุบัน บ่งชี้รูปแบบ OneOf

advertise_custom:
type: object
x-f5xc-conflicts-with:
- advertise_on_public
- advertise_on_public_default_vip
- do_not_advertise

ประเภท: object

ให้ข้อจำกัดการตรวจสอบรวมถึงขีดจำกัดขนาด array, ช่วง integer, ข้อกำหนดความไม่ซ้ำกัน และเมทาดาทาการค้นพบ

routes:
type: array
x-f5xc-constraints:
constraintType: "array"
minItems: 1
maxItems: 256
uniqueItems: false
metadata:
source: "discovery"
confidence: 0.99
validatedAt: "2026-01-19T12:00:00Z"
port:
type: integer
x-f5xc-constraints:
constraintType: "number"
minimum: 1
maximum: 65535
metadata:
source: "discovery"
confidence: 0.99

ประเภท: string

ให้ความยาวคำอธิบายทางเลือกสำหรับกรณีการใช้งานที่แตกต่างกัน:

  • x-f5xc-description-short: สูงสุด 60 ตัวอักษร (คอลัมน์ CLI, badges)
  • x-f5xc-description-medium: สูงสุด 150 ตัวอักษร (tooltips, สรุป)
domains:
type: array
description: "List of domains the load balancer will serve"
x-f5xc-description-short: "Domains to serve"
x-f5xc-description-medium: "List of domains for which the load balancer accepts traffic"

ประเภท: any (ตรงกับประเภทฟิลด์)

ให้ตัวอย่างฟิลด์ที่เป็นรูปธรรมสำหรับเอกสารและเครื่องมือ

name:
type: string
x-f5xc-example: "example-app"
domains:
type: array
x-f5xc-example: ["example.com", "www.example.com"]

ประเภท: array of strings

บ่งชี้ข้อกำหนดเฉพาะบริบทโดยใช้ flags: minimum_config, create, update, read

metadata.name:
type: string
x-f5xc-required-for: ["minimum_config", "create"]
metadata.uid:
type: string
x-f5xc-required-for: ["read"]
ไฟล์เนื้อหา
docs/specifications/api/virtual.jsonสคีมา http_loadbalancer ทั้งหมดพร้อมการเพิ่มประสิทธิภาพ
docs/specifications/api/openapi.jsonข้อกำหนดที่รวมกันพร้อมสคีมาทั้งหมด
ไฟล์วัตถุประสงค์
config/minimum_configs.yamlแหล่งที่มาของเมทาดาทาการกำหนดค่าขั้นต่ำ
config/constraint_patterns.yamlคำนิยามรูปแบบข้อจำกัด
config/guided_workflows.yamlคำนิยามขั้นตอน guided workflow
config/domain_descriptions.yamlเมทาดาทาคำอธิบายระดับโดเมน
  • viewshttp_loadbalancerCreateSpecType - สคีมาสำหรับการดำเนินการสร้าง
  • viewshttp_loadbalancerReplaceSpecType - สคีมาสำหรับการดำเนินการอัปเดต
  • viewshttp_loadbalancerGetSpecType - สคีมาสำหรับการดำเนินการอ่าน
เวอร์ชันวันที่การเปลี่ยนแปลง
2.0.462026-04-18เพิ่มค่าเริ่มต้นที่เซิร์ฟเวอร์กำหนด, การผสานรวม guided workflow และขยายส่วนการกำหนดค่าขั้นต่ำ
2.0.452026-01-20เอกสารการเพิ่มประสิทธิภาพ http_loadbalancer เริ่มต้น