Posts

Showing posts with the label cluster

running a victoriametrics cluster

I recently had a need to work with metrics, and looking at the landscape of modern tools, went with victoriametrics. After initially using the single binary version, I went on to setup the cluster version, using two nodes for everything (free nodes in oracles free tier!) run these binaries on each node (where 10.0.2.41 and 10.0.2.40 are the addresses of the nodes) ./vmstorage-prod -retentionPeriod 5y -storageDataPath /var/lib/victoriametrics ./vminsert-prod -storageNode=10.0.2.41:8400 -storageNode=10.0.2.40:8400 -replicationFactor=2 ./vmselect-prod -storageNode=10.0.2.41:8401 -storageNode=10.0.2.40:8401 -replicationFactor=2 -dedup.minScrapeInterval=1ms front vmselect and vminsert with nginx server { listen 443 ssl; server_name metrics.foo.bar; location /insert/ { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://localhost:8480; } location /select/ { proxy_set_header Host $host; ...
Image
Distributing files across a web farm or cluster. We have 100's of servers in several locations , as part of our web content management we need to push content out frequently, some times several times a hour or more. To date, we have used a mixture of http downloads and rsync script to accomplish this.  Now we are testing new mixture, that we hope will scale out. In our central location we have a large archive with all the files we need to distribute.  Our remote datacenters have a single node in each datacenter to help with distribution.  we take the archive, lets pretend its a freebsd iso file, and we make it available via https, so we can download it over the internet between our datacenters, not via our mpls or other expensive transits.  using metalink files, you can also specify the internal source as a lower preference. then within the datacenter we share the file via torrent with the single node mentioned above being the seed for the dat...

How to sync your keys to your server farm / clusters

you need sshpass and ssh-copy-id , then do; echo " StrictHostKeyChecking no" >> .ssh/config echo "UserKnownHostsFile = / dev / null" >> .ssh/config cat mylistofservers.txt | xargs -P10 -I {} sshpass -p 'mypassword' ssh-copy-id {}