1+ /* Copyright 2025 The xLLM Authors. All Rights Reserved.
2+
3+ Licensed under the Apache License, Version 2.0 (the "License");
4+ you may not use this file except in compliance with the License.
5+ You may obtain a copy of the License at
6+
7+ https://github.com/jd-opensource/xllm-service/blob/main/LICENSE
8+
9+ Unless required by applicable law or agreed to in writing, software
10+ distributed under the License is distributed on an "AS IS" BASIS,
11+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ See the License for the specific language governing permissions and
13+ limitations under the License.
14+ ==============================================================================*/
15+
16+ #pragma once
17+
18+ #include < string>
19+
20+ #include " common/macros.h"
21+
22+ namespace xllm_service {
23+
24+ class Options {
25+ public:
26+ Options () = default ;
27+ ~Options () = default ;
28+
29+ // http server options
30+ PROPERTY (std::string, server_host);
31+
32+ PROPERTY (int32_t , http_port) = 9998 ;
33+
34+ PROPERTY (int32_t , http_idle_timeout_s) = -1 ;
35+
36+ PROPERTY (int32_t , http_num_threads) = 32 ;
37+
38+ PROPERTY (int32_t , http_max_concurrency) = 0 ;
39+
40+ // rpc server options
41+ PROPERTY (int32_t , rpc_port) = 9999 ;
42+
43+ PROPERTY (int32_t , rpc_idle_timeout_s) = -1 ;
44+
45+ PROPERTY (int32_t , rpc_num_threads) = 32 ;
46+
47+ PROPERTY (int32_t , rpc_max_concurrency) = 0 ;
48+
49+ PROPERTY (int32_t , num_threads) = 32 ;
50+
51+ PROPERTY (int32_t , max_concurrency) = 32 ;
52+
53+ PROPERTY (int32_t , timeout_ms) = 32 ;
54+
55+ // instance manager options
56+ PROPERTY (std::string, etcd_addr);
57+
58+ PROPERTY (int32_t , detect_disconnected_instance_interval) = 15 ;
59+
60+ // scheduler options
61+ PROPERTY (std::string, load_balance_policy);
62+
63+ PROPERTY (int32_t , block_size) = 128 ;
64+
65+ PROPERTY (uint32_t , murmur_hash3_seed) = 1024 ;
66+
67+ PROPERTY (std::string, service_name);
68+
69+ // tokenizer options
70+ PROPERTY (std::string, tokenizer_path);
71+
72+ // trace options
73+ PROPERTY (bool , enable_request_trace) = false ;
74+ };
75+
76+ } // namespace xllm_service
0 commit comments