Odin SQL

Programming, software and technology

  • Blog
  • About
  • Contact
You are here: Home / Archives for programming

.NET Core runtime CoreCLR released on GitHub

February 4, 2015 by Benjamin Knigge Leave a Comment

coreclr opensource on github

coreclr opensource on github

 

If you’re a .NET developer you’re probably exited to hear that the .NET Core run time AKA CoreCLR has been released on GitHub.

The code currently is running on Windows with support for Linux and Mac promised in the cumming months. Very soon we will have the ability to write MVC 6 web apps in C# or your favorite .NET language using Visual Studio 2015 and then deploy to a Linux servewith official support from Microsoft.

What is .NET Core?

.NET Core is basically a stripped down and streamlined and rewritten version of the .NET framework removing all of the windows specific code and functionality. .Net Core will provide the core functionality of just in time compilation and garbage collection of your .NET code and will allow support running and deploying ASP.NET vNext Model View Control (MVC) web apps on Windows, Linux and Mac.

Why did Microsoft release CoreCLR as open source?

It isn’t altruism that has led Microsoft to open up CoreCLR. Over the past several years Microsoft has been loosing market share on the web server. PHP has been around for years and despite it’s bad design and numerous security issues it doesn’t seem to be going anywhere.  Ruby has been gaining ground for years, Java won’t die despite Oracles best efforts and many new start ups are taking a look at Go.  More than a few .NET developers are tempted to leave the Microsoft development world behind and take up development with one of these open source alternatives. Developers and development tools have been a major reason for Microsoft past successes. Microsoft is scared of losing these developers and the the “enterprise” customers that they work for, which make up the majority of their profits.  Opening up ASP.NET vNext and CoreCLR and giving away Visual Studio  for free is Microsoft’s attempt at keeping as many developers as possible in the Microsoft sphere of influence while at the same time hopefully attracting a few additional developers. They are hoping that once a developer gains experience working on C# in Visual Studio they are more likely to work on a desktop app using C# and Visual Studio than abandoning windows entirely for Linux.

Why am I so excited about CoreCLR on Linux?

I’ve been working with ASP.NET since it was in beta with brief hiatuses while working on Java, Perl and PHP web sites. During that time I’ve come to appreciate Visual Studio and C#.  C# is a great programming language and Visual Studio is undoubtedly the best IDE available today. Unfortunitly I’ve found myself working less with C# over the past couple of years. This has primary been due to the fact that deploying ASP.Net apps on Windows Servers is significantly more costly than deploying apps on an inexpensive Linux VPS. Soon the cost of deployment should no longer be an issue. I’m looking forward to writing ASP.NET MVC apps in C# using Visual Studio and deploying them to a Nginx web server.

Another area of concern that I’ve has is the performance of .NET apps vs. apps written in code that is natively complied such as C and Go. Fortuitously Microsoft has also announced .NET Native. Apps compiled with .NET Native utilizes significantly less memory and provides greater performance than apps using the just in time compiled common language runtime.

A year ago I doubt anyone would have believed you if you told them that Microsoft would be releasing ASP.NET for Linux and now it looks like it will be here by summer 2015.

 

Leave me a comment and Let me know your thought on .NET Core, ASP.NET vNext and .NET Native.

Filed Under: programming, web development Tagged With: .NET, ASP.NET, C#, Linux, nginx

The importance of load testing a website (for free)

December 29, 2014 by Benjamin Knigge 3 Comments

So you’ve got your site up or you’ve just finished your awesome new mobile app, but how many users can it handle before it comes to a screeching halt leaving a negative impression on your end users and pissing off your boss, investors or partners?

Why is load testing important?

The worst time to discover that your current infrastructure can only handle 100 simultaneous users is when you have 1000 simultaneous users trying to access your site after you’ve spent a significant amount of money on marketing, or if you’re lucky enough to have a positive article about your company publish in a major newspaper or magazine.

If you plan on 10,000 simulations users you need to test for at least that many users. It’s easy to write a web app that can respond to one user at a time it’s significantly more difficult to write a web app that can scale up to 100,000 or a million simultaneous users.

Many of my freelance clients approach me in extreme desperation after hiring the lowest bidder on one of the many freelance development marketplaces and discovering that  their site becomes extremely slow or even unresponsive with only a few simultaneous users. The developers they hired were quick to push out a site that has an illusion of functionality but a few weeks later is more of a liability than an asset. These clients are never happy when I tell them that building a web site that scales well can be significantly more expensive and time consuming than what they’ve currently invested.

 

How many users do you plan on?

Currently this blog is only 3 weeks old and is averaging about 500 unique users per day with my highest day being 1200. Ideally I would like to have 100,000 unique users per day (I can dream) on average but the requests are not distributed evenly throughout a 24 hour period. The majority of my users are visiting from late morning to early evening in North American time zones. This traffic pattern is fairly typical for a website targeted at native English Speakers. The United States and Canada make up the majority of the native English speaking population on the web.  I’m getting a decent amount of traffic from the UK and Australia but they’re not typically visiting during my peak hours of utilization.

My busiest hour is between 4 – 5 pm eastern standard time and during that 1 hour I’m getting about 20% of my blog traffic for the day.  If that patters hold true while my site continues to grow and gain a following, will I be able to handle the traffic on my current $10 a month Linode VPS? If my plan is 100,000 I will need to test for 20,000 per hour or 334 per minute during my busiest hour.

 

How to load test?

There are numerous services and testing frameworks available.  I’ve gone with loader.io because it’s easy to use and there is a free plan available that can simulate up to 10,000 simulates users. they are owned by SendGrid so I don’t think they’re going to disappear anytime soon.

Setting everything up and getting started is pretty simple. You register for free (actually free no credit card required). They send you a confirmation email.  You validate your email and then you’re ready to add a site. After entering your domain name you have to validate that the site is yours. They do this by having you upload a text or html file containing a unique string. This step is necessary to prevent malicious users from using their service to overwhelm a website.  You’re basically designing a test to discover the limits of your web site that is almost identical to a denial of service attack if your web site can’t handle the load that you’re going to be sending at it. I’ve included a screen-cap below of the test adding interface it’s all pretty simple.  You point them at a URL and tell them how many users you want to simulate over a given period of time. You can start the test immediately or schedule the test for when you your site is usually under light load.  It’s not a good idea to load test a live site that you or your clients are dependent on for revenue.  You may want to point the test at a development server.

It’s important to note that the free version of loader.io only loads a single URL and doesn’t load any included js, css or images or run any javascript that may be making api calls.  This isn’t a problem for me since CloudFlare is serving up all of my static content and I’m not making any api calls. If you are making many API calls in JavaScript then this might not be a suitable solution for your load testing needs.

Loader.io add a test interface

Loader.io add a test interface (click to enlarge)

 

What do the results look like?

I’m fairly confident in the way I’ve set up this WordPress blog It may only be a $10 Linode VPS that it’s running on but I’ve configured WP Super Cache and Nginx is really good at serving static files. I’m also using CloudFlare as my content distribution network. I think that my site can handle 10,000 users per minute.  Let’s see if I’m correct.

loader.io results for OdinSQL

loader.io results for OdinSQL (click to enlarge)

So it looks like sending 10,000 requests at my server in a minute resulted in 100% success. If my site is capable of serving 10,000 users in a minute it should be fine handling  100 – 200 thousand users per day without any problem.

If you would like to see more detailed results from my test here’s a link to the results on loader.io

 

Update:

After my initial post I decided to  to test the limit of my current configuration.  I ran tests with 15,000, 17,500 and 20,000 requests per minute.

I handled 15,000 requests pretty well.  –15,000 report–

At 17,500 my response times were starting to get pretty bad but the site was still functional. –17,500 report–

20,000 requests per minute brought this site down response times were over 3 seconds and about 1/3 of the requests resulted in a timeout error.  I had to abort the test at 55 seconds.  –20,000 report–

So now I know If I’m getting more than 15,000 page requests per minute I’ll need to do some upgrades.  Realistically though I would upgrade long before that.

If you test your site, please post the results here in the comments. Let us know what kind of hosting you are using and your configuration. If you’re results aren’t that great I’ll try to give you some advice and help you improve them.

 

If you would like to test your own site
Try loader.io for Free

 

If you’re in need of a great web host I highly recommend that you

Sign up for a Linode SSD VPS

After reading through all of this you’ve decided that you would rather leave the management of you server in the hands of professionals have a look at

CloudWays Managed VPS

CloudWays offers VPS management on top of DigitalOcean’s network

That’s it for this post. I hope that you’ve found the information it contains useful. If you have any questions, criticism, advise or suggestions please leave me a comment below and let me know.  If you would like to stay updated about new content on OdinSQL.com I would like to invite you to join my email list by filling out the short form on the right side navigation.  I promise not to fill your inbox with spam if you do.

Filed Under: Hosting, programming, web development Tagged With: loader.io, SendGrid, Wordpress

Go needs an IDE and intergrated debugger

December 11, 2014 by Benjamin Knigge 16 Comments

go gopher

go gopher

Go 1.4 was released today and I thought I would write about where I would like to see Google’s Go team dedicate some resources. By writing this, it’s my hope that it somehow manages to make its way back to Google and hopefully they can get to work on implementing a solution.

 

Go needs an IDE

If you’ve written any go code then you know that there isn’t any standard or even predominantly used development environment or IDE.  From what I’ve gathered by watching the go-nuts Google group and reading other blogs It seems that most people are using either Sublime or LiteIDE. I’ve tried both and can’t say that I’m a huge fan of either one.

I’m of the belief that a good IDE can simplify common tasks and dramatically improve a developers productivity.  At the same time I think a good IDE could rapidly accelerate the adoption of Go which would then lead to further improvements in both the amount and quality of go code.  If you take a look at two of Google’s other projects, Dart and Android you’ll notice that Google has created IDE’s for both, Dart Editor for Dart and Android Studio in the case of Android. In the case of Android Studio this seems to be a highly customized version of JetBrains InteliJ. While Dart Editor uses components from Eclipse. There is currently a plugin for InteliJ that adds some basic go support but I would love to have full-fledged IDE.  I understand that not everyone sees the benefit of an IDE but there are many developers that do. For those that do appreciate the benefits of an IDE this would be seen as a wonderful step forward for Go.

 

Go needs a working debugger

If you’ve tried to use GDB you know exactly what I’m talking about. GDB doesn’t work with Go.  Writing fmt.Printf everywhere is reminiscent of my early days working with PHP. I’m pretty sure I’m not the only one that would like to see a real working debugger for Go.

An IDE with a working integrated debugger would be a great addition to the Go community.

Filed Under: programming Tagged With: Android, Dart, GDB, Go, Golang, IDE, InteliJ, JetBrains

Who’s behind Odin SQL

Benjamin KniggeWhen I'm not traveling, writing code or optimizing stored procedures I can often be found working on my blog. Learn More…

Email Newsletter

Sign up to the Odin SQL newsletter and receive the latest posts and custom personalized content.

Recent Posts

  • How I improved my WordPress GTmetrix grade
  • A Vultr walk-through
  • DreamHost coupons and promo codes
  • WPEngine coupons and promo codes
  • GoDaddy vs. HostGator vs. BlueHost vs. DreamHost

Categories

  • Hosting
  • Meta
  • programming
  • Software
  • spam of shame
  • Uncategorized
  • web development
  • wordpress

Featured Post

How I improved my GTmetrix page speed and yslow scores.

How I improved my WordPress GTmetrix grade

I’ve managed to improve my GTmetrix page speed and Ylow grades from the mid 70’s to 98% for Page Speed and 97% for YSlow with a page load time of only 1.18 seconds. Here’s a link to the report (if the link is dead feel free to re-run the test). In this post I’m going to […]

Featured Post

CPU utilization

Linode vs. DigitalOcean vs. Vultr vs. RamNode

Comparing SSD cloud VPS hosting providers can be difficult A virtual cpu core at one hosting provider won’t be equivalent to a virtual cpu core at another host or even another virtual cpu core at the same host depending on the specifications of the underlying hardware and the underlying hardware’s utilization at the time of […]

Featured Post

DigitalOcean vs. Linode

Digital Ocean vs. Linode – Which virtual server?

If you’re reading this you’re probably on the hunt For the best Virtual Private Server (VPS) that you can find and you’ve come to the correct conclusion that it comes down to DigitalOcean vs. Linode. In this post I’m going to outline the pros and cons of each, present you the benchmarks and hopefully help […]

Copyright © 2025 — OdinSQL.com