
The missing dns-preheating daemon!
Explore the docs »
Screenshots
·
Report Bug
·
Request Feature
During my quest to improve customer satisfaction, I asked myself how I may reduce the impact on customers dns response times during frequent component replacements (the component is a dns-resolver in this case if you mind asking).
Background: In a setup where services are announced via bgp, any component is suspect to hot replacement. DNS-resolver heavily rely on their query cache to answer valid or bogus queries as fast as possible. When spinning up a new server, it may experience full production traffic without a filled cache. This may lead to clogged query upstreams or even a brief period of blacklisting if a common upstream resolver (e.g. tiering) is used. To address this issue, this project was started.
Side note: This is also a "java programmer"'s first take on a go
application which is perfect for this use-case.
NOTE: Please download/build a specific release first See Releases for prebuilt artifacts
Usage is as easy as:
# linux/mac
./syringe PARAMS
# windows
.\syringe.exe PARAMS
Flag | Value | Default | Description |
---|---|---|---|
-help | (none) | Print a help message showing all available flags | |
-config | Valid Path | syringe.yml | Use the specified config instead of the default |
For informations regarding the configuration file, please refer to the Documentation
Getting started is easy as there are many methods to start right away!
- First clone the repository
git clone https://github.com/TCMPK syringe
cd
into the cloned directorycd syringe
docker
docker-compose
- Build the image and start an attached compose-stack
docker-compose up # will do a "docker-compose build" if the image does not exist
- Open
http://localhost:8000/docs/index.html
which which should present you with the swagger-api documentation. Now you can get your hands on
docker
- Build the image
docker build -t syringe . # build the image named "syringe" in the current directory .
- Start the container and attach
# The api is listining on 0.0.0.0:8000 so we need to map the port docker run -it -p 8000:8000 syringe # start the container and attach stdout/stdin
- Open
http://localhost:8000/docs/index.html
which which should present you with the swagger-api documentation. Now you can get your hands on
golang
gcc
- Download all modules
go mod download
- Build
# build linux/mac go build -o syringe # windows go build -o syringe.exe
- Run
# linux/mac ./syringe # windows .\syringe.exe
- Open
http://localhost:8000/docs/index.html
which which should present you with the swagger-api documentation. Now you can get your hands on
Metrics are exposed as Prometheus
metrics are available via localhost:8000/metrics
.
Visualization is also provided as Grafana
dashboard in the grafana/dashboard.json
folder.
- Install Prometheus or use a
Docker
container - Install Grafana or use a
Docker
container - Setup a
Prometheus
scrape job and adjusttarget
as for your deploymentscrape_configs: - job_name: 'syringe scrape' scrape_interval: 5s static_configs: - targets: - 'localhost:8000'
- Add the
Prometheus
data source toGrafana
- Import the
Grafana
dashboard from thegrafana/dashboard.json
file - Select the correct
Data Source
(uses default by default) in thesyringe
dashboard if multiple data sources are present
Grafana Dashboard grafana/dashboard.json
Swagger Documentation http://localhost:8000/docs/index.html
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the Apache license 2.0.
Peter Klein - [email protected]
Project Link: https://github.com/TCMPK/syringe