https://www.mnxsolutions.com/services/linux-server-managemen...
I’d be happy to chat with anyone, even if to provide some feedback or a quick audit to help you avoid the next outage.
- nick at mnxsolutions com
171–180 of 233 posts
https://www.mnxsolutions.com/services/linux-server-managemen...
I’d be happy to chat with anyone, even if to provide some feedback or a quick audit to help you avoid the next outage.
- nick at mnxsolutions com
I highly recommend Kubernetes as infrastructure. It has a reputation for being too complex to use on your own or with simple projects but that reputation is undeserved. Self-healing container orchestration has been eye-opening for me. Many people groan at the prospect of learning something new but it is remarkably easy to use, the only barrier to entry being the high cost of cloud solutions and the unwillingness of m…
Having run K8s a bit on my own... Please don't run your own cluster. K8s is great and has a lot of wonderful features which help immensely with automation (ex: You tell it "I want to run 3 copies of this software and here's how to check it's health" and if it sees unhealthy containers or less than 3 copies running... it fixes the problem). However K8s is a bear to run in its own right. As a single-person company you…
Edit: I forgot about HyperiotOS, which is another viable option. MicroK8s has Canonical’s backing so it has quickly become the most well-supported option. It advocates single-node clusters for development but it supports multi-node as well.
#!/bin/bash
thisHtml=`curl -s "[your site's web address]"`
if [[ $thisHtml != •"[your site's title]"• ]]; then
#echo "Server is down"
ssh -i "[your pem file]" -t ec2-user@[ip address] 'sudo /bin/bash -c "killall -9 node"'
ssh -i "[your pem file]" -t ec2-user@[ip address] 'sudo /bin/bash -c "export PATH="/root/.nvm/versions/node/v8.11.2/bin:/usr/lib/node:/usr/local/bin/node:/usr/bin/node:$PATH" && forever start /var/www/html/[...]/index.js"'
rebootDate=`TZ=":[your time zone]" date '+%Y-%m-%d %H:%M:%S'`
echo "$rebootDate" >> "/home/ec2-user/serverMonitoring/devRestarts.txt"
fi
I am a solo founder of a website monitoring SaaS [0]. Theoretically, my uptime should be higher than that of my customers'. Here are a few things that I found helpful in the course of running my business: * Redundancy. If you process background jobs, have multiple workers listening on the same queues (preferably in different regions or availability zones). Run multiple web servers and put them behind a load balancer.…
At fail-over my local machine will also switch from the dev database to prod (connecting to the RDS instance). It'll only has read-only access to relevant data, but it'll keep the site 90% functional.
Is it perfect? Hell no. Pretty hacky, but it's kept my application running twice after a failure in the past two years.
Also, send errors through chat platforms like Telegram to be notified of any errors/monitor the servers
I am a solo founder of a website monitoring SaaS [0]. Theoretically, my uptime should be higher than that of my customers'. Here are a few things that I found helpful in the course of running my business: * Redundancy. If you process background jobs, have multiple workers listening on the same queues (preferably in different regions or availability zones). Run multiple web servers and put them behind a load balancer.…
> Monitor your infrastructure and set up alerts [..] "fatal" OR "exception" OR "error" I almost have the regex "fatal|invalid|unknown|error|except|critical|cannot" in muscle memory many years after having last had to type it - must have typed it thousands of times tailing and grepping logs :- )
%w[fatal invalid unknown error except critical cannot].any? {|word| 'My critical error message'.include? word}
... may be better than a regex if it's just a list of literal strings. Javascript also has something similar.I am a solo founder of a website monitoring SaaS [0]. Theoretically, my uptime should be higher than that of my customers'. Here are a few things that I found helpful in the course of running my business: * Redundancy. If you process background jobs, have multiple workers listening on the same queues (preferably in different regions or availability zones). Run multiple web servers and put them behind a load balancer.…
I highly recommend Kubernetes as infrastructure. It has a reputation for being too complex to use on your own or with simple projects but that reputation is undeserved. Self-healing container orchestration has been eye-opening for me. Many people groan at the prospect of learning something new but it is remarkably easy to use, the only barrier to entry being the high cost of cloud solutions and the unwillingness of m…
I am leaning toward learning k8s seriously and am actually curious on your take: is the overhead of learning and maintaining a k8s cluster actually better than using AWS features like autoscaling coupled with health checks?
To maintain portability you need to pay attention to CPU architecture and the underlying OS. Just make sure that your images are built for the same architecture that you will use in the cloud and that you have the right OS and version. x86_64 is ubiquitous (I think AWS offers an ARM server option, though) so developing on a Raspberry Pi cluster might be a headache to deploy.
For production you will want to use a cloud provider (or not, it’s not the craziest idea to run a home server if your use case permits) and you can do so for development if you can afford it.
The real advantages are service discovery, monitoring options, stateful support and resource allocation. I used Kubernetes Up and Running 2nd Edition, and if you don’t know Docker yet I would work through the Docker Book first because you will want to write your own images. Just make sure that everything lives in the same repository: a single filesystem as the single source of truth.
I agree in general with the responses encouraging better usage of managed platforms. I've run a SaaS app for a couple of years using a combination of AWS Elasticbeanstalk (Flask and Django) and AWS Lambda. Server resource related downtime has been minimal and recovery is quick/automated. Even hosting on Lambda you can run into issues without layers of redundancy (Lambda may be fine but a Route 53 outage would prevent…
We are considering Datadog, and nothing else seems to compare to them, but they seem extremely expensive. As a small startup/solo founder, did your implementation justify costs?
- metrics system (Prometheus, InfluxDB, Graphite, etc.)
- dashboards (Grafana)
- alerts (both the metrics system and Grafana can handle this)
If you're not a big-data company, you can self-host instances of these products reliably.
Disclosure: My startup, https://HostedMetrics.com, provides turnkey hosted versions of these software packages.
I'd be happy to explain the options that are out there and provide any advice you need. Get in touch: contact info is in my profile.