Using App Engine at Scale – Web Development
Articles,  Blog

Using App Engine at Scale – Web Development


So we just spent our last unit, unit 6, talking about scaling and basically 101 uses of memcache. Now, a lot of the things that we talked about in scaling, you know, adding new app servers and adding more memcaches and scaling the DB horizontally and through sharding App Engine does for you. And have you guys been taking advantages of those features? Has that worked out for you in production? Absolutely. The auto-scaling is probably the best feature of it. It works really smoothly. It’s very transparent. And, our traffic definitely has peaks and valleys. You know, there’s been a lot of press, and that brings a lot of traffic, and with course launches there’s a lot of traffic. There’s a lot of traffic as, you know, homework deadlines come up, things like that. And we can handle that without thinking about it. Some of the–I wasn’t there, but I’ve heard some stories from the early classes and the early AI prototype from the fall, and Mike pretty much was spinning up servers nonstop. You know, he didn’t sleep for a couple of weeks. He was doing nothing but spinning up new virtuals. And we don’t have to do that. We don’t have to think about it. And we just, you know, check each day to see how many instances we have running. There was a time where we accidentally DDoS’d ourselves with a bug that was sending way too many requests back to the server, some Ajax requests, and when we spun up to a couple hundred instances, you know, everything was fine. Our users were still able to continue, and every site that’s learning how to scale has made that mistake. But most of those other sites took themselves down for the day while they figured out what was going on, and we were able to figure out what was going on without going down. So, I think that was just an instance of, you know, kind of proof where it really does work well. Cool. It’s funny to me that you mention on App Engine, you know, checking how many app servers you have in the morning because on reddit and Hipmunk that’s a number we are really familiar with. You know, adding a new app server is something we do deliberately and especially, I know it is with reddit, something with a lot of deliberation beforehand. You know, how is this going to fit in the architecture? How is this going to change things, you know, with regards to caching and what not? And on App Engine, you know, you’re working in a different– You have to kind of develop things in a different style as a result of this nature, And I wonder if you can comment on kind of how App Engine was designed and how it kind of fits the way you’ve done things in the past? It’s really become clear to me in my time that I’ve been working with it that it was designed by people that had been through that several times with different kinds of apps because the solutions and the things that they provide you kind of has those characteristics of if you were building something over again just the way you’d do it. Like if, for example, the queing can get really complex, and their queing system, you know, well, you create a task; you give it some properties. The properties that they give you that you can kind of tune are exactly the ones that you’d want to tune. And then the trigger is just a simple, like, a web hook callback. And so your worker logic is just like any other request handler, and it’s just very simple, you know, kind of like the least common denominator sort of mentality. So trying to just simplify things is definitely something that really comes to mind. Cool.

Leave a Reply

Your email address will not be published. Required fields are marked *