Avatar of Justin Dorfman

Justin Dorfman

Developer Evangelist at StackShare

Decision at BootstrapCDN about PHP, MaxCDN, Bootstrap, GitHub, OpenSource, BuzzSumo, BootstrapCDN

Avatar of jdorfman
Developer Evangelist at StackShare ·
PHPPHPMaxCDNMaxCDNBootstrapBootstrapGitHubGitHub
#OpenSource
#BuzzSumo
#BootstrapCDN

The following will be a series of decisions we made that took BootstrapCDN from 0 to over 74 billion requests a month (and growing).

Initially, I didn’t want to do BootstrapCDN. I have attempted a few projects like it before and they always failed to gain any traction. In June of 2012, my boss at the time (and good friend today), David Henzel got a BuzzSumo Alert coming from an #OpenSource project on GitHub called Bootstrap and someone mentioned that MaxCDN was always looking for projects to sponsor. Long story short, David registered the domain and told me to get to work.

The first version of the site was written in PHP. It was quick and dirty but met the scope. We beta tested it for a month then people started to use it after searching for “bootstrap cdn” on Google.

I was still skeptical until, well, that’s for the next decision.

AMA below. 👇

11 upvotes·37.4K views

Decision at BootstrapCDN about Ruby, Node.js, Amazon S3, MaxCDN, Google Analytics, Bootstrap, BootstrapCDN

Avatar of jdorfman
Developer Evangelist at StackShare ·

This is the second Stack Decision of this series. You can read the last one to catch up (link below). Bootstrap, Jacob Thornton aka @fat tweeted about #BootstrapCDN and according to Google Analytics, that sent 10k uniques to the site in 24 hours. Now I was pumped but I knew I was way over my head and needed help. Fortunately, I met my co-maintainer Josh Mervine at the 2013 O’Reilly Velocity Conference and we hit it off immediately. I showed him the MaxCDN and Amazon S3 stats and his eyebrows went up. When I showed him the code, he was very polite, “well, I mean it works but I really want to try Node.js out so I’m just going to rewrite everything in Node and Ruby for the S3 scripts.

I didn’t know what to expect from Josh, to be honest. In the next decision (part 3), I will go over how he completely transformed the project.

AMA below 👇

8 upvotes·30.7K views

Decision at BootstrapCDN about MaxCDN, Java

Avatar of jdorfman
Developer Evangelist at StackShare ·

This is the fourth Stack Decision of this series. Read the last one to catch up.

My friend and I were driving up to northern California, I got a tweet saying that their corporate anti-virus software was reporting that certain files on BootstrapCDN contained malicious code that installed Java malware on Windows XP workstations. The hackers were clever, using MaxCDN's #API they found a way to update the origin server URL & port (8080) to their server and only updated a few files to fly under the radar.

I thought it was over, who was going to use BootstrapCDN after this? Well, like earlier I was wrong again. After the postmortem was written people left comments and emailed us saying “thanks” which I can’t thank those who did, it kept me going. Which was needed because the next wave of issues are coming in part 5.

AMA below. 👇

8 upvotes·11.6K views

Decision about Atom, Visual Studio Code

Avatar of jdorfman
Developer Evangelist at StackShare ·

A few months ago, I decided I would try Visual Studio Code. I resisted for so long because I knew I would love it and would then have to find alternative extensions for the ones I have installed in Atom. Fast forward to today and I'm kicking myself for not doing it sooner.

Extensions that I use:

What VSCode extensions do you use? 👇

8 upvotes·7.7K views

Decision at StackShare about Visual Studio Code, YAML

Avatar of jdorfman
Developer Evangelist at StackShare ·

I'm currently working on a project that requires me to work in a #YAML file a lot. If you use Visual Studio Code and find yourself doing the same, I highly recommend installing vscode-yaml by RedHat.

Not only does it detect whether your file(s) are valid .yaml it also does autocompletion among other things.

6 upvotes·1.8K views

Decision about Fastly, Grunt, jQuery, Bootstrap, Jekyll, Let's Encrypt, Netlify, GitHub Pages, MaxCDN, Webperf, StaticSiteGenerators, GoogleFonts, CDN

Avatar of jdorfman
Developer Evangelist at StackShare ·

When my SSL cert MaxCDN was expiring on my personal site I decided it was a good time to revamp some things. Since GitHub Services is depreciated I can no longer have #CDN cache purges automated among other things. So I decided on the following: GitHub Pages, Netlify, Let's Encrypt and Jekyll. Staying the same was Bootstrap, jQuery, Grunt & #GoogleFonts.

What's awesome about GitHub Pages is that it has a #CDN (Fastly) built-in and anytime you push to master, it purges the cache instantaneously without you have to do anything special. Netlify is magic, I highly recommend it to anyone using #StaticSiteGenerators.

For the most part, everything went smoothly. The only things I had issues with were the following:

  • If you want to point www to GitHub Pages you need to rename the repo to www
  • If you edit something in the _config.yml you need to restart bundle exec jekyll s or changes won't show
  • I had to disable the Grunt htmlmin module. I replaced it with Jekyll layout that compresses HTML for #webperf

Last but certainly not least, I made a donation to Let's Encrypt. If you use their service consider doing it too: https://letsencrypt.org/donate/

4 upvotes·15.4K views

Decision at BootstrapCDN about nginx, MaxCDN

Avatar of jdorfman
Developer Evangelist at StackShare ·

This is the fifth Stack Decision of this series. Read the last one to catch up.

One thing that happens when your service gets really popular is that you start running into server capacity issues. From day 1 we launched with #SSL, which might seem like “well duh” today, but it wasn’t that common in 2012. Jump to circa 2015 and the service is doing ~4k request per second (on average) and over 75% of those are SSL, puts a lot of stress on the CPUs.

At the time, MaxCDN deployed a custom build of nginx and we optimized the hell out of it. What we ended up having to do was basically dedicating a server in the busiest datacenters (PoPs) just for BootstrapCDN. Most enterprise customers didn’t even get their own (because they didn't need it). The engineering team did some other cool optimizations but I honestly can’t remember verbatim. Hopefully, they can comment on this. I’m lucky because this allowed me to work with some really great engineers, inside and outside of MaxCDN. Specifically an engineer by the name of XhmikosR. That’s in part 6.

AMA below. 👇

4 upvotes·11.1K views

Decision at StackShare about macOS, Windows, CloudApp, Skitch

Avatar of jdorfman
Developer Evangelist at StackShare ·

I use CloudApp because it saves me so much time and energy. I use it at the very least once an hour. When Skitch was shutdown I thought my life was over! CloudApp saved the day and gave me features that Skitch didn't have.

If you write a lot of technical content (or any content for that matter) it is an invaluable tool. I'm not sure about Windows support but it integrates flawlessly with macOS. 🤘

4 upvotes·2.7K views

Decision at StackShare about cURL

Avatar of jdorfman
Developer Evangelist at StackShare ·

To view the HTTP headers of any URL all you need to do is run the following with cURL:

$ curl -I https://example.com

The response should look something like this:

HTTP/2 200
accept-ranges: bytes
cache-control: max-age=604800
...
x-cache: HIT
content-length: 1270

If your URL has query strings then you will need to add double quotes:

curl -I "https://example.com?query=string&foo=bar"

4 upvotes·459 views

Decision at BootstrapCDN about Vim, Pug, ExpressJS, Node.js, Bootswatch, Amazon S3, YAML

Avatar of jdorfman
Developer Evangelist at StackShare ·

This is the third Stack Decision of this series. You can read the last one to catch up (link below).

Josh is a machine. He cranked out the rewrite of the site and as well as the Amazon S3 syncing/permissions/content-type scripts in less than a week (with a full time job + 2 small kids at the time). The new site had/has a section where you could try out all of the Bootswatch themes on our site and while it might sound silly, it showed me that he goes above and beyond and I totally lucked out.

Anyway, Josh decided to go with Node.js, ExpressJS, Jade (now called Pug), and configs with #yaml, all things I have read about but never used in production. I quickly found out Josh was a Vim user (still is), because every Jade file he worked on had //- vim: ft=jade sw=4 sts=4 et: at the bottom.

Everything was running smoothly, I was encouraged by David (co-founder from part 1) to take a vacation. I took him up on that. Unfortunately, my timing couldn’t have been worse. More on that in part 4.

AMA below 👇

3 upvotes·16.2K views