We do not log in to our servers every day to check how the resource usage is. Just like with uptime monitoring we need a system to help us monitor if everything is inside reasonable limits so we can scale the servers if required. And detect any potential problem before it becomes a problem.
The latest update in the C# in a Nutshell series, it obviously covers C# 7.0. With 1037 pages it is a massive volume, most of it can be used as a reference book, and many of the chapters are not important unless you have very specific needs. The topic in each chapter is covered in significant detail, you will be hard-pressed to find a detail that is not covered I think.
It can be read, cover to cover, but I would recommend to read the first 4 chapters and pick from the remaining based on interest or need. The detail level and reference book type of writing make the book dry to read, so be warned!
My notes from the book are collected here, I hope they will be useful to someone.
- It is not possible to have the apex record of a domain point to a CNAME.
- Moving the domain names of a service that runs HTTPS requires great care.
I added a network load balancer to sit in front of my Docker hosts to allow them to be fall over for each other. After that, I moved datadriven-investment.com to www.datadriven-investment.com because of the problem with apex DNS record mentioned above.
To improve the load time from the previous article, we must look to caching. I have always been fascinated by technology that allows us to serve pages very VERY fast. So in this article, I am going to explore a few different options for making WordPress load faster using caching.
It is not feasible to make software like WordPress load in less than 100ms, just loading the front page on this blog takes around 400ms which is already fast for a WordPress site. So we need a caching system in front of it to improve the load time.
This article extends the setup explained in the previous article.
Briefly, the setup consists of a load balancer, an HTTP server, and a PHP-fpm backend, all running in a Docker Swarm environment as explained here.
Previously the load balancer was bound to the manager node in the Docker swarm because it needed access to the Let’s Encrypt certificate files. To prepare for a fully replicated and fault tolerant design, this needs to be fixed so it can run from any node.
Because of the mesh network in Docker swarm, the load balancer does not need to run on the manager node where the external IP is bound. It can run on any host; the mesh network will route the request to the right container. But that requires us to replicate the Let’s Encrypt certificates and make sure they can be renewed and reloaded independently of which host the load balancer is running. This article explains how I changed that and moved renewal into Docker.
The book is published in 2014 so it is starting to show some age. Even though ASP.NET MVC 5 is the last version until it changed the name to ASP.NET MVC Core which is in version 2, see the version history here. So why read a four year old book? Many projects still use MVC 5 and it allowed me to gain an overview of the technology before diving into MVC Core. Unless you have a particular interest in MVC 5 I would recommend a book about MVC Core instead.
At 624 pages and 17 chapters, I read it in a couple of weeks. It does start to show it’s age when referencing jQuery and AngularJS, it is rather old versions mentioned. But the chapters about the MVC framework are sound and contains a good walkthrough about each main feature of the framework. If you need a primer on MVC 5 I will recommend it.
Your deployment environment is a tool that should be sharpened to allow maximum productivity. I have seen many developers where their deployment environment is less than optimal, hurting their productivity.
Ranging from, developing directly on production sites. To develop on a shared server. And finally using a local development environment, which I think is the most optimal way to do it.
Developing directly on production is “fast”, but remember the quote
If you develop directly in production, the business will be all over you when you break things, and you will break things! So take the time to get a setup that allows you to go fast in the future.
A local development environment has many advantages and with Docker, it is easy to set up. I will show how I handle the setup for my development. Including tip for how you can take advantage of a local development environment.
There are many reasons for running a website on HTTPS instead of the regular HTTP. One reason is that Google Chrome soon will start to mark HTTP sites as insecure, possibly spooking your visitors. It is also a signal to your visitors that the communication between them and your website is protected.
In this article, I will describe how to set up Let’s Encrypt which provides free HTTPS certificates. It is part of a continuous effort to make the setup, described in the earlier articles, best-practice. I also offer some background information about HTTPS certificates for the interested reader.
Apparently, performance on a website is essential. Slow sites are a pain for all visitors, and often slow sites put excessive load on the servers as well. To improve the performance of a website, a few tools will help us to pinpoint areas to enhance. It is a combination of settings in Nginx and WordPress. It builds on the setup described in this article but you can use the advice standalone. Most of the optimizations are useful on any web platform, not just WordPress, and Nginx.
This article builds on the platform described in the last seven parts, a WordPress setup running on AWS using Docker. In this article, we will look into how to improve uptime and scalability for the service by replicating it across multiple servers. To allow for replication, several challenges need to be solved. How to handle this is covered in this article, including comments on a few problems I found like Docker nodes running out of memory and how to fix it. And network problems in Docker swarm mode.