You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an [RFC 868](https://datatracker.ietf.org/doc/html/rfc868/)[Time Protocol](https://en.wikipedia.org/wiki/Time_Protocol) Server implemented with [openSUSE/xinetd](https://github.com/openSUSE/xinetd).
3
+
This is an [RFC 868](https://datatracker.ietf.org/doc/html/rfc868/)[Time Protocol](https://en.wikipedia.org/wiki/Time_Protocol) Server implemented with [openSUSE/xinetd](https://github.com/openSUSE/xinetd) running on Alpine Linux.
4
4
5
-
## Client
5
+
The image is lightweight and suitable for production use.
6
6
7
+
## Building the image
8
+
9
+
You can build the image using the provided `Makefile`:
10
+
11
+
```bash
12
+
make build
13
+
```
14
+
15
+
This will build the Docker image with the name `panubo/alpine-xinetd`.
16
+
17
+
## Running the server
18
+
19
+
To run the time server, you can use the `run` target in the `Makefile`:
20
+
21
+
```bash
22
+
make run
7
23
```
24
+
25
+
This will start the container and map the necessary ports (37/tcp and 37/udp).
26
+
27
+
## Testing
28
+
29
+
### Client Example
30
+
31
+
You can test the server using tools like `socat` or `rdate`.
32
+
33
+
```bash
34
+
# Test UDP
8
35
socat -x - UDP4-DATAGRAM:127.0.0.1:37
36
+
37
+
# Test TCP
9
38
socat -x - TCP-CONNECT:127.0.0.1:37
10
39
11
-
# rdate is part of busybox
40
+
#Using rdate (part of busybox)
12
41
rdate -p 127.0.0.1
13
42
```
43
+
44
+
### JMeter Load Tests
45
+
46
+
The project includes a JMeter test plan to verify the server's functionality. To run the tests, you need to have Docker installed.
47
+
48
+
First, build the JMeter test image:
49
+
50
+
```bash
51
+
cd tests/jmeter
52
+
make build
53
+
```
54
+
55
+
Then, run the tests:
56
+
57
+
```bash
58
+
make run-test
59
+
```
60
+
61
+
This will execute the test plan `Test Plan.jmx` and connect to a local instance of time-server running on localhost / UDP port 37.
0 commit comments