Commit 7c7c8266 authored by helloyongyang's avatar helloyongyang
Browse files

docs(server): Add a doc of Scheduling Between Multiple Services

parent 9b03e5c1
......@@ -23,7 +23,6 @@ The service endpoint is: `/v1/local/video/generate`
The `message` parameter in `scripts/post.py` is as follows:
```python
message = {
"task_id": generate_task_id(),
......@@ -68,3 +67,14 @@ python scripts/stop_running_task.py
The service endpoint is: `/v1/local/video/generate/stop_running_task`
After terminating the task, the server will not exit but will return to waiting for new requests.
### Scheduling Between Multiple Services
You can start multiple services using `scripts/start_server.sh`. Note that the port numbers under the same IP must be different for each service.
```shell
python scripts/post_multi_servers.py
```
`post_multi_servers.py` will schedule client requests according to the status of the services.
......@@ -67,3 +67,14 @@ python scripts/stop_running_task.py
服务的接口是:`/v1/local/video/generate/stop_running_task`
终止了任务之后,服务端并不会退出服务,而是回到等待接收新请求的状态。
### 多个服务之间的调度
可以通过`scripts/start_server.sh`起多个服务,注意同一个ip下的端口号,不同服务之间要保持不同。
```shell
python scripts/post_multi_servers.py
```
`post_multi_servers.py`会根据服务的空闲状态,进行调度客户端发起的请求。
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment