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

การปรับปรุง Origin Pool

ข้อมูลเมตาการเพิ่มประสิทธิภาพสำหรับสคีมาที่เกี่ยวข้องกับ origin_pool ดูคำนิยามส่วนขยายได้ที่ OpenAPI Extensions

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

  • origin_poolCreateSpecType
  • origin_poolReplaceSpecType
  • origin_poolGetSpecType
ฟิลด์จำเป็นสำหรับหมายเหตุ
metadata.nameการดำเนินการทั้งหมด1-63 ตัวอักษร, ตัวพิมพ์เล็กและตัวเลข, รูปแบบ: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
metadata.namespaceการดำเนินการทั้งหมดตัวระบุ namespace
spec.origin_serversสร้างอย่างน้อย 1 รายการ
spec.portสร้าง1-65535, ไม่มีค่าเริ่มต้นของเซิร์ฟเวอร์
{
"metadata": {
"name": "my-origin-pool",
"namespace": "default"
},
"spec": {
"origin_servers": [
{
"public_name": {
"dns_name": "backend.example.com"
}
}
],
"port": 443
}
}

ฟิลด์ที่ทำเครื่องหมายด้วย x-f5xc-server-default: true จะมีค่า default ถูกกำหนดโดย F5 XC API server เมื่อไม่ได้ระบุในคำขอ

ฟิลด์ค่าเริ่มต้นประเภทคำอธิบาย
no_tls{}objectปิดใช้งาน TLS ไปยัง origin
healthcheck[]arrayไม่ได้กำหนดค่า health check
loadbalancer_algorithmROUND_ROBINenumการกระจายโหลดแบบ round-robin
endpoint_selectionDISTRIBUTEDenumใช้ endpoint ทั้งหมด (ในพื้นที่ + ระยะไกล)

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

ฟิลด์ค่าเริ่มต้นประเภทคำอธิบาย
connection_timeout2000integerระยะเวลาหมดเวลาการเชื่อมต่อในหน่วยมิลลิวินาที
http_idle_timeout300000integerระยะเวลา HTTP idle timeout ในหน่วยมิลลิวินาที (5 นาที)
same_as_endpoint_port{}objectHealth check ใช้พอร์ตของ endpoint
default_circuit_breaker{}objectการตั้งค่า circuit breaker เริ่มต้น
disable_outlier_detection{}objectปิดใช้งานการตรวจจับ outlier
no_panic_threshold{}objectไม่มี panic threshold
disable_subsets{}objectปิดใช้งานการกระจายโหลดแบบ subset
auto_http_config{}objectการเจรจาโปรโตคอล HTTP อัตโนมัติ
disable_proxy_protocol{}objectปิดใช้งาน proxy protocol
disable_lb_source_ip_persistance{}objectปิดใช้งาน LB source IP persistence
เส้นทางค่าเริ่มต้นคำอธิบาย
origin_servers[].labels{}ออบเจกต์ labels ว่างเปล่า
origin_servers[].public_name.refresh_interval0ใช้การรีเฟรช DNS เริ่มต้นของระบบ

ความไม่สอดคล้องระหว่าง UI กับค่าเริ่มต้นของเซิร์ฟเวอร์

หัวข้อที่มีชื่อว่า “ความไม่สอดคล้องระหว่าง UI กับค่าเริ่มต้นของเซิร์ฟเวอร์”

เว็บ UI ของ F5 XC จะเลือกค่าที่แตกต่างจากที่ API กำหนดเมื่อไม่ได้ระบุฟิลด์

ฟิลด์UI เลือกไว้ล่วงหน้าเซิร์ฟเวอร์กำหนดหมายเหตุ
loadbalancer_algorithmLB_OVERRIDEROUND_ROBINทรัพยากรที่สร้างจาก UI และ API จะแตกต่างกันเมื่อไม่ได้ระบุฟิลด์
ค่าคำอธิบายหมายเหตุ
ROUND_ROBINเลือก endpoint ที่ดีต่อสุขภาพแต่ละรายการตามลำดับ round-robinค่าเริ่มต้นของเซิร์ฟเวอร์
LEAST_REQUESTเลือก endpoint ที่มีคำขอที่ใช้งานอยู่น้อยที่สุด
RING_HASHการ hashing แบบสม่ำเสมอโดยใช้ ring hash ของชื่อ endpoint
RANDOMเลือก endpoint ที่ดีต่อสุขภาพแบบสุ่ม
LB_OVERRIDEนโยบาย hash สืบทอดจาก load balancer หลักค่าเริ่มต้นของ UI
ค่าคำอธิบายหมายเหตุ
DISTRIBUTEDพิจารณาทั้ง endpoint ระยะไกลและในพื้นที่ค่าเริ่มต้นของเซิร์ฟเวอร์
LOCAL_ONLYใช้เฉพาะ endpoint ในพื้นที่เท่านั้น
LOCAL_PREFERREDให้ความสำคัญกับ endpoint ในพื้นที่ หากไม่พร้อมใช้งานจึงใช้ระยะไกล

กลุ่มฟิลด์ที่ใช้ร่วมกันไม่ได้ สามารถระบุได้เพียงหนึ่งฟิลด์จากแต่ละกลุ่มเท่านั้น:

กลุ่มฟิลด์ค่าเริ่มต้นของเซิร์ฟเวอร์
การกำหนดค่าพอร์ตport, automatic_port, lb_portport (กำหนดชัดเจน)
TLS ไปยัง Originno_tls, use_tlsno_tls
พอร์ต Health Checksame_as_endpoint_port, health_check_portsame_as_endpoint_port
Circuit Breakerdefault_circuit_breaker, disable_circuit_breaker, circuit_breakerdefault_circuit_breaker
การตรวจจับ Outlierdisable_outlier_detection, outlier_detectiondisable_outlier_detection
Panic Thresholdno_panic_threshold, panic_thresholdno_panic_threshold
Subset LBdisable_subsets, enable_subsetsdisable_subsets
โปรโตคอล HTTPauto_http_config, http1_config, http2_optionsauto_http_config
Proxy Protocoldisable_proxy_protocol, proxy_protocol_v1, proxy_protocol_v2disable_proxy_protocol
LB Source IPdisable_lb_source_ip_persistance, enable_lb_source_ip_persistancedisable_lb_source_ip_persistance
Connection Poolenable_conn_pool_reuse, disable_conn_pool_reuseenable_conn_pool_reuse
ฟิลด์ประเภทข้อจำกัด
spec.portinteger1-65535
spec.advanced_options.connection_timeoutinteger0-1,800,000 ms
spec.advanced_options.http_idle_timeoutinteger0-600,000 ms
spec.advanced_options.panic_thresholdinteger0-100 (เปอร์เซ็นต์)
metadata.namestring1-63 ตัวอักษร, รูปแบบ: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$

เว็บคอนโซลของ F5 XC นำเสนอตัวเลือกการกำหนดค่า 15 รายการสำหรับ origin pool:

#ป้ายกำกับใน UIเส้นทางฟิลด์ APIประเภทค่าเริ่มต้นของเซิร์ฟเวอร์
1Origin Server Portspec.[port|automatic_port|lb_port]OneOfport (กำหนดชัดเจน)
2Connection Pool Reusespec.[enable_conn_pool_reuse|disable_conn_pool_reuse]OneOfenable_conn_pool_reuse
3Health Check Portspec.advanced_options.[same_as_endpoint_port|health_check_port]OneOfsame_as_endpoint_port
4LoadBalancer Algorithmspec.loadbalancer_algorithmenumROUND_ROBIN
5Endpoint Selectionspec.endpoint_selectionenumDISTRIBUTED
6TLS to Originspec.[no_tls|use_tls]OneOfno_tls
7Connection Timeoutspec.advanced_options.connection_timeoutinteger2000 ms
8HTTP Idle Timeoutspec.advanced_options.http_idle_timeoutinteger300000 ms
9Circuit Breakerspec.advanced_options.[default_circuit_breaker|disable_circuit_breaker|circuit_breaker]OneOfdefault_circuit_breaker
10Outlier Detectionspec.advanced_options.[disable_outlier_detection|outlier_detection]OneOfdisable_outlier_detection
11Panic Thresholdspec.advanced_options.[no_panic_threshold|panic_threshold]OneOfno_panic_threshold
12Subset Load Balancingspec.advanced_options.[disable_subsets|enable_subsets]OneOfdisable_subsets
13HTTP Protocolspec.advanced_options.[auto_http_config|http1_config|http2_options]OneOfauto_http_config
14Proxy Protocolspec.advanced_options.[disable_proxy_protocol|proxy_protocol_v1|proxy_protocol_v2]OneOfdisable_proxy_protocol
15LB Source IP Persistencespec.advanced_options.[disable_lb_source_ip_persistance|enable_lb_source_ip_persistance]OneOfdisable_lb_source_ip_persistance
ไฟล์เนื้อหา
docs/specifications/api/virtual.jsonorigin_poolCreateSpecType, origin_poolReplaceSpecType, origin_poolGetSpecType
docs/specifications/api/openapi.jsonข้อกำหนดที่รวมไว้พร้อมสคีมาทั้งหมด
defaults.resources.origin_pool
├── server_applied # ฟิลด์ที่มี x-f5xc-server-default: true
├── recommended # ฟิลด์ที่มี x-f5xc-recommended-value
├── advanced_options # ค่าเริ่มต้นของ advanced_options ที่ซ้อนกัน
├── oneof_choices # การเลือกค่าเริ่มต้นของ OneOf
└── ui_vs_server # ความไม่สอดคล้องระหว่าง UI กับเซิร์ฟเวอร์

Origin server สามารถระบุได้โดยใช้ตัวแปรประเภทต่าง ๆ โดยประเภทจะกำหนดว่าต้องใช้ฟิลด์เพิ่มเติมใดบ้าง

ประเภทคำอธิบายฟิลด์ที่จำเป็นสถานะ
public_nameเซิร์ฟเวอร์ต้นทางที่มีชื่อ DNS สาธารณะdns_name✅ สมบูรณ์
public_ipเซิร์ฟเวอร์ต้นทางที่มีที่อยู่ IP สาธารณะip (IPv4)✅ สมบูรณ์
{
"origin_servers": [
{
"public_name": {
"dns_name": "backend.example.com"
}
}
]
}
{
"origin_servers": [
{
"public_ip": {
"ip": "8.8.8.8"
}
}
]
}

ประเภท origin server ต่อไปนี้ต้องการการพัฒนาตรรกะทรัพยากร “site” ก่อนการนำไปใช้งาน:

ประเภทคำอธิบายฟิลด์ที่จำเป็นสถานะ
private_ipเซิร์ฟเวอร์ต้นทางที่มี IP ส่วนตัว/สาธารณะและข้อมูล siteip, site_locator, network_choice, snat_pool🔲 รอตรรกะ site
private_nameเซิร์ฟเวอร์ต้นทางที่มีชื่อ DNS และข้อมูล sitedns_name, site_locator, network_choice, snat_pool🔲 รอตรรกะ site
k8s_serviceKubernetes service ที่มีข้อมูล siteservice_name, site_locator, network_choice🔲 รอตรรกะ site
consul_serviceHashiCorp Consul service ที่มีข้อมูล siteservice_name, site_locator, network_choice🔲 รอตรรกะ site

ก่อนที่ประเภทเหล่านี้จะสามารถจัดทำเอกสารได้อย่างครบถ้วน:

  1. การค้นหาทรัพยากร Site - จัดทำเอกสารสคีมาทรัพยากร site และรูปแบบ site_locator
  2. Enum ของ Network Choice - จัดทำเอกสารค่าที่จำกัดของ network_choice (site_local_inside, site_local_outside ฯลฯ)
  3. ตัวเลือก SNAT Pool - จัดทำเอกสารรูปแบบการกำหนดค่า SNAT pool
  4. การอ้างอิงข้ามทรัพยากร - กำหนดวิธีที่ origin_pool อ้างอิงทรัพยากร site
  • ตัวแทนการกำหนดค่า: config/discovered_defaults.yamlorigin_pool.origin_server_types.enums
  • Sprint ที่เกี่ยวข้อง: การเพิ่มประสิทธิภาพสคีมาทรัพยากร site
เวอร์ชันวันที่การเปลี่ยนแปลง
2.1.22026-01-18เพิ่มส่วนประเภท origin server พร้อม public_name/public_ip; เครื่องหมาย TODO สำหรับประเภทที่ขึ้นอยู่กับ site
2.1.12026-01-18เขียนใหม่เป็นการอ้างอิง API ล้วน ๆ; ลบตัวอย่างโค้ดปลายทางออก
2.1.02026-01-18อัปเดตเป็นโครงสร้างค่าเริ่มต้นแบบรวมใน validation.json
2.0.332026-01-17เอกสารการปรับปรุง origin pool เริ่มต้น