Skip to content

Configuration

Lyo Kato edited this page Apr 20, 2022 · 30 revisions

Setup

You can configure the requiem settings in the config file (config/config.exs, config/releases.exs, etc.) by writing the following

config :my_app, MyQuicHandler,
  port: 443,
  cert_chain: "cert/cert.pem",
  priv_key: "cert/priv.pem",
  max_idle_timeout: 300000

Parameters

Key Default Description
host 0.0.0.0 The host value to use when opening the UDP port
port 443 The port number to use for UDP
socket_pool_size 0 Number of sockets you want to create for UDP packet. if set 0, number of CPU is set automatically.
socket_read_timeout 100 millisecond. for UDP socket's "recv"
socket_send_timeout 100 millisecond. for UDP socket's "send"
dispatcher_pool_size 10 The number of dispatchers that will check the QUIC header after the socket receives a packet and process it appropriately in parallel. And this number is for each socket. If set 10 for this, and set 8 for socket_pool_size, 80 dispatchers will be created.
token_secret random 16 bytes Secret value to be used for encryption when generating retry-token
connection_id_secret random 32 bytes This is the secret value used to generate a new SCID for the server based on the DCID value embedded in the header by the client
allow_address_routing false Whether to enable routing to the Connection using the source address when the DCID embedding in the header is omitted

Each of parameters in following table corresponds to quiche::Config. So you can check how they works from this site.

https://docs.rs/quiche/0.6.0/quiche/struct.Config.html

Key Default
cert_chain -
priv_key -
verify_locations_file -
verify_locations_directory -
grease true
verify_peer false
enable_early_data false
application_protos []
max_idle_timeout 60_000
max_udp_payload_size 1350
initial_max_data 1_000_000
initial_max_stream_data_bidi_local 100_000
initial_max_stream_data_bidi_remote 100_000
initial_max_stream_data_uni 100_000
initial_max_streams_bidi 1
initial_max_streams_uni 2
ack_delay_exponent 3
max_ack_delay 25
disable_active_migration true
cc_algorithm_name reno
enable_hystart false
dgram_queue_size 1000

Clone this wiki locally