Cheap Ass Servers

Pinch your pennies...

Presented by LB Corney / @lb_corney

    Overview -- Review of some tools and capabilities:

  • Inexpensive or free offerings
  • Test out your code, learn new skills
  • Most of these solutions are for development and prototyping only

What types of things are we talking about?

  • Servers
  • MicroServices
  • Storage
  • Tricks, Hacks and Cheats

Servers

    Servers -- What capabilities do we need?

  • Functional server for Node.js
  • Sockets Available
  • Convenient interface for uploading code
  • Method available to monitor performance and logs

OpenShift V2

  • 3 small gears
  • 512MB Ram/gear
  • 1Gb storage/gear
  • Idle after 24 hours
  • Sockets Available
  • Genrally you update code via git push
  • No longer available after 1 Aug 2016

OpenShift V3

Oops. Looks like the V2 plan is no longer available for new users

  • One application only
  • Pricing details not available Sept 2016
  • Code update via online git push to master
  • Code repo must be available online to OpenShift servers
  • Bitbucket repositories will work.

Heroku

  • Free Tier
  • 512MB Ram, 1 web & 1 worker.
  • Sleeps after 30 minutes of inactivity
  • Must sleep 6 hrs in 24.0

Honorable Mention -- Digital Ocean

This suggestion raised at the presentation. The $5/month plan is pretty reasonable

  • 512Mb Memory
  • 1 Core Processor
  • 20GB SSD Disk
  • 1TB Transfer

MicroServices

What's a microservice?

With Lambda, its a function that takes an event and a context, and runs on the cloud

With Zeit, its way more than just that

Amazon's Lambda

  • Free tier includes 1M free requests per month
  • Free tier includes 400,000 GB-seconds of compute time /month.
  • Free Tier is available to existing customers indefinitely.
  • Set up for Node, Python or Java
  • AWS Console or IDE with Plugin for code insertion.

Zeit

  • zeit.co/now
  • 20 FREE deploys per month
  • 1GB FREE monthly bandwidth
  • 1GB FREE storage, 1MB size limit per file
  • FREE BACKUPS, Dynamic Realtime Scaling™
  • No custom domains
  • Wow, but this one is easy. ($ NPM install -g now), followed by ($ now)
  • Here Kids, its free cocaine, yup, its free!

Data Storage

OpenShift

You can install MySQL, PostgreSQL, MongoDB, and SQLite within your gears.

Mlab (was MongoLab)

Free tier = MongoDB with 500 Mb of storage

Heroku Free Tier

  • Postgres 10K rows of storage
  • Redis (25 MB, 20 Connections)

Amazon DynamoDB

  • Free Tier = DynamoDB customers get 25 GB of free storage
  • Enough throughput to handle up to 200 million requests per month
  • 2.5 million read requests from DynamoDB Streams for free.
  • Oops. That offer is good for the Amazon 12 month introductory offer only.

Iris Couch

This one showed promised a month ago, but the web url is now dead.

Tricks, Hacks and Cheats

CGI-Node

CGI-Node provides the ability to run JavaScript on any web server just like PHP as a CGI using Node.js. The hack is to run this on a PHP server you are already paying for. (GoDaddy, HostGator, etc?)

http://www.cgi-node.org/

LocalHost

Well duh, of course you can do this, but where is the fun in that?

You can do IP addressing for anybody in your local network (e.g. Hackathon); What about linking to that server from elsewhere, even outside of the network?

Continued...

Ngrok

Enter Ngrok. Ngrok tunnel opens up a single long lived TCP connection using stream multiplexing

Ngrok.com offers free pricing:

  • --HTTP/TCP tunnels on random URLs/ports
  • --1 online ngrok process
  • --4 tunnels per ngrok process
  • --40 connections / minute
  • Zach tip check out github for localtunnel.me

Host your own

Take that ten year old desktop that you found on the curb on trash day and build your own Linux server. You know you want to.

Expand your skill set into Dev Ops, do cool stuff, get a new job for way more money! Retire early so you will have time to prepare for VegasJS meetup presentations.

Demos!

OpenShift

Node API Server grabbed at random from Github New App from source code Link Download and login with Command line tool.

Catch22: If using a local Git repository, the repository must have an origin remote that points to a URL accessible by the OpenShift Origin cluster.

Zeit.co/now

Wow, fricking Wow.

`$ npm install -g now` then cd to your repository on local hard drive, and `$ now`

Lessons Learned...

  • Have a nice interesting sample of code all ready before you start an exercise like this. Something like a functional Mr Men site.
  • There really aren't that many great deals out there, and things are getting more frugal...
  • Lot of bait and switch ads. Free, but its clearly not.

Links

Questions, Comments?

Reveal.JS presenter tool & documentation