Server 설정 파일

Server config file

Top Level

타입필수설명
MyIDintany number, 0 ~ 1000
HttpServerobj arrayhttp listener 정보 목록
HttpRouterobj arrayOhttp router 정보 목록
HttpLogstringhttp logger name
TcpServerobj arraytcp listener 정보 목록
Relayobj arrayrelay 정보 목록
AccessPolicyobj arrayname of access policy
AutoCertobjauto certification (인증서 무중단 자동 갱신) 정보
Logobj arraylogger 정보 목록
Verboseboolean–verbose, boolean(true, false)
ShutdownTimeoutintshutdown max wait time in sec.
Brokerobjbroker 정보

TcpServer

tcp listener 정보

타입필수설명
Namestringname of TcpServer
ListenstringOip:port
Destinationstring arrayDestination 목록. 여러 개가 지정된 경우 round robin 방식으로 사용
Routingstringrandom, hash-host (src+dst), hash (src), default: random
Relaystringrelay name
ConnectTimeoutintconnection timeout (sec)
KeepAliveintkeep alive timeout (sec)
AccessPolicystringname of access policy

HttpServer

http listener 정보. <ip_addr>:<port> 또는 <ip_addr>:auto-cert
:auto-cert가 설정되었다면, fluid는 <ip_addr>:443<ip_addr>:80 포트를 listen 하고 Tls/CertTls/Key 설정을 무시한다.
ex) 0.0.0.0:auto-cert

타입필수설명
NamestringOname of HttpServer
ListenstringOip:port
ReadTimeoutintread timeout, default: 0
WriteTimeoutintwrite timeout, default: 0
IdleTimeoutintidle timeout, default: 0
SockLingerintSO_LINGER, default: 0
SockDelaybooltrue로 설정되면 SO_NODELAY를 disable, default: false
TlsCertstringcertificate file의 경로
TlsKeystringkey file의 경로
AccessPolicystringname of access policy

HttpRouter

Host 항목에는 하단에 설명된 matcher를 사용할 수 있다.

타입필수설명
Serverstring arrayname of HttpServer
Hoststring arrayname of HTTP Host
Routeobj array
Healthzobj
AccessPolicystringname of access policy

HttpRouter/Route

Path, Method 항목에는 하단에 설명된 matcher를 사용할 수 있다.

타입필수설명
Pathstring array
Methodstring array
Rewriterstring
Proxyobj
Staticobj
AccessPolicystringname of access policy

HttpRouter/Route/Proxy

타입필수설명
Destinationstring array
Routingstringrandom, hash, hash-host (default: hash)
InsecureSkipVerifybool
ForwardProxystring
Relaystring
Timeoutintdefault 3
KeepAliveintnetwork keep-alive if supproted
DisableKeepAlivesboolif true, disables HTTP keep-alives
TLSHandshakeTimeoutintdefault 10
DisableCompressionboolif true, prevents the Transport compression
MaxIdleConnsintdefault 10
MaxIdleConnsPerHostintdefault 2
MaxConnsPerHostintdefault 0, no limit
IdleConnTimeoutintdefault 60
ResponseHeaderTimeoutintdefault 30
ExpectContinueTimeoutintdefault 0
ForceAttemptHTTP2intdefault false
WriteBufferSizeintif zero, default 4096
ReadBufferSizeintif zero, default 4096

HttpRouter/Route/Static

타입필수설명
RootDirstring

HttpRouter/Healthz

타입필수설명
Pathstringdefault /healthz
Statusintdefault 200
Textstringdefault ready.
AccessPolicystringname of access policy

AutoCert

타입필수설명
Emailstring
Blackliststring array
RenewBeforeintdays
  • Shared store
타입필수설명
Storestring
Replicaint
Brokerstring array
MaxReconnectintif negative, never give up trying to reconnect
  • Directory store
타입필수설명
StoreDirstring

AccessPolicy

Allow, Deny 항목에는 하단에 설명된 matcher를 사용할 수 있다.

타입필수설명
NamestringO
PolicystringONONE, DENY, ALLOW, DENY_ALLOW, ALLOW_DENY
Allowstring arrayWhite list
Denystring arrayBlack list

Relay

타입필수설명
NamestringO
Brokerstring arrayif empty, use internal broker
InTopicstringO
OutTopicstringO
ConnectTimeoutintdefault 3
ReadTimeoutintdefault 3
WriteTimeoutintdefault 3

Broker

타입필수설명
ServerNamestringdefault: fluid_+host_addr
ListenstringObroker listen address, default: 127.0.0.1:3000
ClientAdvertisestring
StoreDirstringO
ReadyTimeoutintsec. default: 5
LogTimebooldefault: true
NoLogbooldefault: false
LogSizeLimitintdefault: 104857600 (100M)
LogMaxFilesintdefault: 1
TraceVerbosebooldefault: false
Authorizationstring
JetStreambooldefault: true
JetStreamMaxMemoryintdefault: 1073741824 (1G)
JetStreamMaxStoreintdefault: 5250048000 (5G)
Clusterobjenable cluster
Routesstring arraycluster routing

Broker/Cluster

타입필수설명
NamestringOnode name
ListenstringOcluster node listen addr (host:port)
Advertisestringadvertise address
NoAdvertisebooldefault: false
ConnectRetriesint
PoolSizeint

Log

타입필수설명
NamestringOlogger name
LevelstringODEBUG, INFO, WARN, ERROR
AddSourcebooladd source code file name and line
Formatstringjson, text, dev
Fileobjfile logger config
Teestring arraytee logger, array of logger names

If File and Tee is not defined, it will printout the log into stdout.

Log/File

타입필수설명
Filenamestringfile path
MaxSizeintmax log file size in MB
MaxAgeinthow many days log backups are kept
MaxBackupsinthow many log backups are kept
LocalTimebooluse local time instead of UTC
Compressboolcompress log backup files

matcher 정보

matcherprefix예제
prefix match\~\~ /db/
glob match\g\g /web/*
exact match없음/web
regular expression\r`\r .+(.yml
expr evaluator\e\e hasSuffix(PATH, '.yml')
최근 업데이트