instance_macro {
  version: "0.0.2"
  maxconn: 5000
  f_workers {
    type: GET_WORKERS
    get_workers_params {
    }
  }
  sections {
    key: "admin"
    value {
      ips {
        value: "127.0.0.1"
      }
      ips {
        value: "::1"
      }
      ports {
        f_value {
          type: GET_PORT_VAR
          get_port_var_params {
            var: "port"
          }
        }
      }
      nested {
        http {
          nested {
            admin {
            }
          }
        }
      }
    }
  }
  sections {
    key: "https_section"
    value {
      ips {
        value: "*"
      }
      ports {
        value: 443
      }
      nested {
        extended_http_macro {
          enable_ssl: true
          ssl_sni_contexts {
            key: "cert1"
            value {
              servername_regexp: "(https)"
              c_cert {
                id: "cert1"
              }
              ciphers: "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:kEECDH+AESGCM+AES128:kEECDH+AESGCM+AES256:kRSA+AESGCM+AES128:kEECDH+AES128:kRSA+AES128:!aNULL:!eNULL:!MD5:!EXPORT:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2:!RC4:!3DES:!DSS"
              ssl_protocols: "tlsv1.1"
              ssl_protocols: "tlsv1.2"
              ssl_protocols: "tlsv1.3"
            }
          }
          ssl_sni_contexts {
            key: "default"
            value {
              servername_regexp: "default"
              c_cert {
                id: "cert1"
              }
              ciphers: "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:kEECDH+AESGCM+AES128:kEECDH+AESGCM+AES256:kRSA+AESGCM+AES128:kEECDH+AES128:kRSA+AES128:!aNULL:!eNULL:!MD5:!EXPORT:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2:!RC4:!3DES:!DSS"
              ssl_protocols: "tlsv1.1"
              ssl_protocols: "tlsv1.2"
              ssl_protocols: "tlsv1.3"
            }
          }
          ssl_sni_ja3_enabled: true
          maxlen: 65536
          maxreq: 65536
          report_input_size_ranges: "32,64,128,256,512,1024,4096,8192,16384,131072,524288,1048576,2097152"
          report_output_size_ranges: "512,1024,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,4194304,8388608"
          yandex_cookie_policy: YCP_STABLE
          nested {
            regexp {
              sections {
                key: "awacs-balancer-health-check"
                value {
                  matcher {
                    match_fsm {
                      uri: "/awacs-balancer-health-check"
                    }
                  }
                  nested {
                    errordocument {
                      status: 200
                    }
                  }
                }
              }
              sections {
                key: "slbping"
                value {
                  matcher {
                    match_fsm {
                      url: "/ping"
                    }
                  }
                  nested {
                    slb_ping_macro {
                      active_check_reply {
                        zero_weight_at_shutdown {
                          value: true
                        }
                      }
                    }
                  }
                }
              }
              sections {
                value {
                  matcher {
                  }
                  nested {
                    modules {
                      headers {
                        create_weak {
                          key: "X-Yandex-HTTPS"
                          value: "yes"
                        }
                      }
                    }
                    modules {
                      headers {
                        create_func {
                          key: "X-Forwarded-For-Y"
                          value: "realip"
                        }
                      }
                    }
                    modules {
                      regexp {
                        sections {
                          key: "default"
                          value {
                            matcher {
                            }
                            nested {
                              regexp_host {
                                sections {
                                  key: "domain1"
                                  value {
                                    pattern: "((https))(:443)?"
                                    nested {
                                      regexp {
                                        include_upstreams {
                                          type: ALL
                                        }
                                      }
                                    }
                                  }
                                }
                                sections {
                                  key: "domain_not_found"
                                  value {
                                    pattern: ".*"
                                    nested {
                                      errordocument {
                                        status: 404
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  tcp_listen_queue: 128
  unistat {
    hide_legacy_signals: true
  }
  cpu_limiter {
    active_check_subnet_file: "./controls/active_check_subnets_list"
    disable_file: "./controls/cpu_limiter_disabled"
  }
  sd {
  }
  state_directory: "/dev/shm/balancer-state"
  f_dynamic_balancing_log {
    type: GET_LOG_PATH
    get_log_path_params {
      name: "dynamic_balancing_log"
      f_port {
        type: GET_PORT_VAR
        get_port_var_params {
          var: "port"
        }
      }
      default_log_dir: "/place/db/www/logs/"
    }
  }
  pinger_required: true
  f_pinger_log {
    type: GET_LOG_PATH
    get_log_path_params {
      name: "pinger_log"
      f_port {
        type: GET_PORT_VAR
        get_port_var_params {
          var: "port"
        }
      }
      default_log_dir: "/place/db/www/logs/"
    }
  }
  config_check {
  }
  shutdown_close_using_bpf {
    value: true
  }
}
