Recent Posts

High performance and scaling ASP.NET Core and Docker

Friday August 17, 2018

For a recent project I was part of, we were given the NFR (non-functional requirement) of having a cluster of ASP.NET Core Docker containers able to scale up to ~100,000 requests per minute.

Easy right? Just add more containers??

Unfortunately not, it was far more involved than that (particularly as the orchestration tool chosen wasn’t particularly easy to scale with).

We learned a lot while soak testing, and regrettably with live traffic too, exactly how sensitive .NET Core applications at this scale are to the smallest contention issue with threading, networking and also tweaks to the Docker container and the orchestration tool (ECS in this case).

One of these was the ulimit default you have on a container. This is the number of open file handles the container instance can have open.

The default was something around the 100 mark, something we needed to increase into the thousands.

More information can be found here on Ubuntu Stackexchange. There were half a dozen other issues which I could go into more detail with, perhaps in a later blog post or telling you in person!

Photo of the month

Saturday July 28, 2018

It’s been a long time, but here’s a nice photo of Valencia Opera House from pxhere.com, on my list of places to visit.

A list of my wacky diets

Saturday July 28, 2018

Over the past three or four years I’ve tried a number of different diets, mostly to aid my running: this is my experience with all of them:

Change your Powershell prompt to look like bash

Thursday February 23, 2017

The script below changes your Powershell prompt to look a bit more like a Bash one. Update your ~Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 file to add the code below. If you aren’t using poshgit then remove the Import-Module and Write-VcsStatus lines.

Import-Module 'C:\tools\poshgit\dahlbyk-posh-git-7d93c81\src\posh-git.psd1'
function prompt {
    # Shorten the path
    $path = $ExecutionContext.SessionState.Path.CurrentLocation.Path
    $path = $path.Replace($HOME, "~") 

    Write-Host "$path" -ForegroundColor Green -NoNewline
    Write-VcsStatus
    Write-Host ""
    
    "$('$' * ($nestedPromptLevel + 1)) "
}

Your Powershell command prompt will now look something like this:

~\Documents\Code\Github\yetanotherchris.github.io\_posts [master ≡]
$ echo "hello world"

.NET Core continous integration and deployment with Gitlab, Docker, Kubernetes and Google Cloud

Wednesday February 1, 2017

Over the past few months I’ve put Roadkill on hold in my free time, to get some .NET core projects working inside Docker. They’re mostly sandbox websites for exploring the tech stack, and are hosted privately in Gitlab. Gitlab gives you a decent CI server for free, which works really well with CI and deployment of .NET core apps (both websites and console apps).

Podcast of the Month Oct 2016

Sunday October 16, 2016

The first 30 minutes of this podcast are worth a listen alone, Chris Kresser discusses how your stomach biome is linked to depression, your brain and cravings. After that they discuss the role of meat in providing nutrition to humans, and how we don’t consider ourselves animals anymore.

Podcast of the month - Sept 2016

Friday September 9, 2016

A weekly favourite podcast doesn’t really work on this site, as I only end up adding them every month or two. So I’m switching to a monthly format to share my discoveries in the Podcast world.

This month is (another) Sam Harris one, talking about free will. Sam’s books argues for the case that we have no free will beyond very simple choices. For example speaking - the broka region of the brain is responsible for speech but how much of your speech is words you are willfully choosing? Or another example given is decisions that the subconscious brain makes for you almost a second before the action is performed (from recent fMRI scans showing this is the case).

Dennett (a philosopher) argues against this.