8 ms·
> The way we set up Soundslice is relatively simple. We made a custom AMI with our code/dependencies, then set up an Elastic Load Balancer with auto-scaling rul
by bearwithclaws 13y ago
> The way we set up Soundslice is relatively simple. We made a custom AMI with our code/dependencies, then set up an Elastic Load Balancer with auto-scaling rules that instantiate app servers from that AMI based on load.
Doesn't sound that simple to me (as a complete sysadmin noob). Somebody should write a book about this.
- adrianh 13y agoHehe, yeah, that sentence doesn't sound particularly simple. :-) Check out the code snippets I linked to from that blog post. It's pretty easy, I promise -- the tricky thing is just figuring out the various APIs.
- scottvdp 13y agoI apparently need to get back to that book.
- toomuchtodo 13y agoYou know those days when you think you know a bit, and stumble upon someone who knows vastly more than you? Today was one of those days. It appears we're both Devops guys in Chicago; can I buy you a beer sometime?
- adrianh 13y agoHey, I'd love to join! I'll buy the beers if you two guys just teach me all the sysadmin stuff you know. :-D
- scottvdp 13y agoI'd certainly be down. I love talking about this entire arena, specifically where it falls on its face.
- tptacek 13y agoIf free beer is the price of entry here, I'd love to pick your brains as well, since we're about to run into this exact same problem. (I'm in Chicago as well)
- deleted 13y ago[deleted]
- minimax 13y agoWhere do all you Chicago hackers hang out? I'm new to the city and I never see anything like a Chicago HN meetup posted here.
- tptacek 13y agoIf you find out, let me know. I can tell you where the infosec / security researcher types are, but not where the startup people are. Maybe we should just invent something new.
- roarktoohey 13y agoI would love to come, just to listen and learn.
- panabee 13y agoThanks for the post. Would you mind sharing how much you were paying Heroku per month (on average and peak usage)? Thanks again!
- toomuchtodo 13y agoWould you be interested in a blog post about it? I'm a sysadmin/devops with 12 years in, and build stuff like this on a daily basis. I wouldn't mind sharing how the sausage is made.
- sigmavirus24 13y agoI wouldn't mind it personally.
- bearwithclaws 13y agoVery interested!
- shanelja 13y agoI'm a PHP dev working with Apache on a daily basis, but besides .htaccess and some minor changes I can't really do much. I would love an article which explained in a simple way how to scale your server and really debug problems with it.
- gs7 13y agoVery interested as well!
- steveklabnik 13y agoLast week, I literally spun down an EC2 instance and signed up for Digital Ocean because I couldn't figure out how the hell to make stuff work on EC2, but have lots of VPS experience. As a dev and not a sysadmin, it's much easier to go with what you know... but I want to learn.
- skinnymuch 13y agoWhat's the difference between EC2 and a VPS for you? Do your VPSs already have things installed or a GUI? I've used EC2 before as a single server, never scaling. The main difference was installing things that are usually pre-installed (like on Ubuntu's official desktop image). Is that it or is it more about the scaling? And thanks for the reference to Digital Ocean. Never heard of them before. Seems great, might try using them :)
- druiid 13y agoThat's actually, honestly, a bad way to do it. It's fine to pre-load an instance with source and application/package dependencies. At this point though, you really should be backing those up with it being deployed by Puppet/Chef. Essentially you pre-run a puppet manifest and have it do all the first-run processing and then store THAT as the AMI/instance. This way you have an instance that only needs a few seconds to get itself ready while also integrating configuration management (which really you should be doing these days). Just some suggestions from a sysadmin.
- rschmitty 13y agoDepends on how fast you want new instances to be online. Sometimes you want to respond to demand very fast, it can take a few minutes for an instance to register with ELB, if you have to download/build/configure packages prior you are just adding minutes on time. The faster you can spin up instances the higher you can run your servers as you need to tell amazon at what threshold should I spawn more instances There are 3 general levels you can take with AMIs: 1) Vanilla instance AMI, have puppet/chef install everything for you, then fetch your app code and configure that 2) Use another tool to have your instance built with puppet/chef and then capture that into an AMI. Once it spins up it just needs to get your app code. Idea here is your services arent likely to need updated as fast as your app code. 3) Same as two, but when your production code is in release/maintenance mode, bake everything into an AMI. When you need to deploy new code, you need to create a new AMI, but you are creating an AMI with scripts so its no big deal :) All you have to do now is update your cloudformation
- druiid 13y agoWell this is why I suggested pre-running with Puppet and 'install' your code and dependencies into the AMI before saving it. That way you get the best of both worlds. Obviously if you have a setup with rapidly deployed code changes you'll want to have your puppet manifest grab the latest version before deploying live when spinning up a new instance.
- brown9-2 13y agoI believe #3 is what Netflix does.
- anon987 13y agoAMI = ISO Elastic Load Balancer = software based load balancer or traffic director auto-scaling rules = if number of connections >50 or bandwidth > 100k or reponse time >10ms start a new instance and automatically update the load balancer so the new instance takes connections
- spydum 13y agoAdd in reasonable max-node count: automated processes that cost you money are dangerous if not governed. You don't want your provisioning tool spinning up endless amounts of nodes, all because some backend database has become slow (some new user pattern has emerged and is causing indexed queries to queue up), and all response times are getting trashed.
- count 13y agoI pitched a book to No Starch and a few others, and they all said there wasn't enough demand...
- pjungwir 13y agoI know Packt was looking for a Chef author a few months ago. I declined to work with them, but I'm working on an outline for a Chef/DevOps book to self-publish.
- sciurus 13y agoI'm surprised I didn't know that; they've invited me to write a book on nearly every other technology I listed on my linkedin profile. :-/ That's why I don't buy books from Packt unless I can find good reviews of it written by members of the community around the software the book is about.
- pjungwir 13y agoPostgreSQL 9.0 High Performance is a Packt book with excellent content, but it has multiple typos and grammar errors on every page. I'm sad to see such an outstanding book marred by bad editing.
- petergeoghegan 13y agoI'm a friend and former colleague of the author, and having read the book from cover to cover I don't think it's true that it has lots of typos. I think you might be confusing it with another title.
- Turing_Machine 13y agoIf you think they're wrong, write it anyway and put it in the Kindle store.
- count 13y agoThat's the approach I'm taking :)
- coolsunglasses 13y agoIt's not simple, AMIs are a pretty bad idea and not something you should rely on due to the statefulness and vendor lock-in unless you can reproduce it in disparate deployment environments from scripts.
- anuraj 13y agoThe AMIs can be imported and work on Eucalyptus private cloud. So there is no lock down: http://en.wikipedia.org/wiki/Eucalyptus_%28computing%29 http://en.wikipedia.org/wiki/Eucalyptus_%28computing%29
- tjbiddle 13y agoIt's actually a lot simpler than it sounds: - Create a new EC2 instance (Literally click "Launch instance" and select Ubuntu. - Login and install any dependencies (sudo apt-get update && sudo apt-get my list of awesome packages i need installed) - Go back to the EC2 dashboard and click "Create AMI" which is just imaging the server. - I can't attest to the ease of ELB and auto-scaling rules as I haven't used them, but I would assume it's fairly straight forward - and there is a ton of resources on AWS to help you out :-) Have fun!
- makerops 13y agoI am working on a site right now http://makerops.com http://makerops.com that will walk through via screencasts, texts, and interactive learning a lot of the issues described by the OP. How to interact, as a dev with various cloud APIs, to auto scale, manage configurations, etc.
- marcins 13y agoCheck out Amazon's Elastic Beanstalk - it handles the provisioning/deployment side of things - setup your environment with "eb start", update your app with just a "git aws.push". Quite configurable via scripts too (install additional packages, etc). Under the hood it's basically the same - Elastic Load Balancer and EC2 instances.
- kclay 13y agoI gave AEB a try with django about 3 months ago and let me say it was a major headache. Some times it would work other times the load balancer would fail other times it would just laugh in your face( there were many more but you get the point). I wasted weeks trying to get our app running, when it came down to only 3days before our demo run I made some bash and fabric scripts and all was running on multiple instances in about 1hr. Took a snapshot of our state and used that Ami for auto scaling. I myself won't be trying AEB again anytime soon.