Setting Up AWS High Availability

Hi All,

WOW its been 5 years since I last posted anything and am considering Xojo Web again for a project.

My requirements will revolve around setting up in AWS (I’ve easily achieved this in the past with a single server) with high availability architecture so basically a load balancer, stateless servers in 3 availability zones, seperate database (RDS Aroura) and likely S3 for assets. Ability to scale horizontally (aotonomously) and vertically (if required) will be the goal.

I’m curious as to anyones experience with doing this.

I am also wondering about sessions between servers and instances? Is it possible to reference completely seperate servers web session or should this be managed in a DB externally?

As AWS can provide a global databse with Aroura, has anyone had experience making their app global?

Any input will be gratefully recieved and thanks in advance!!!

Years ago I deployed a Xojo web app on AWS with nginx as a load balancer and SSL manager, but only on a single server (multiple app instances). It worked great. I think AWS has tools for geographical distribution of sessions, so before nginx gets the connection.

Why would you need this? If you need some kind of communication between different user’s sessions, then the DB route is probably the only way to go.

That’s about all I know. Curious as to what others might offer.

I’ve been working with Apache and CentOS on reverse proxy-ing (that a word?) and eventually looking into load balancing. I don’t have anything technically useful to add to this thread, but since Jay asked I do have opinions on AWS and the code Amazon writes as a company… :wink:

I would add that if you can avoid Amazon’s infrastructure, you should try to. I don’t know anyone using AWS that found the process straightforward.

I agree that AWS isn’t simple, but then anything that gives you lots of options and flexibility never is. Curious as to what hosting platform(s) you recommend. I haven’t seen much promoted other than Xojo Cloud and ServerWarp. And I don’t know what kind of geographical distributed options they have, if any.

Jay, sounds like you are well versed in Operating Systems and Platforms. With that in mind, we have had success in deploying Xojo Web Apps to Ubuntu Servers (32-bit back in the day, 64-bit now), using haproxy as a load balancer. Liquid Web and Digital Ocean are a couple other options that you may want to consider. Digital Ocean has really upped their game, and their pricing options are pretty straightforward.

Hey thanks for the replies. I’m an AWS solution architect and have no issue deploying apps there, in fact I prefer it. I have tested a couple of things since my post with AWS’ ELB’s (elastic load balancers) and 3 instances in 3 different zones in Sydney Australia. Works fine with RDS as a backend (at least a simple example does). I just need to find some routines for S3 access with Xojo code. I’ll be testing performance with Xojo’s inbuilt webserver and using nginx so if anyone has any performance metrics compared to hardware that would be awesome. I shy away from apache these days. The ELB’s they offer can operate on either layer 4 or 7 so there are a lot of configurable options. I could also do this with Nginx but their option is far more scalable and fault tolerant for $18 per month.

The question about sessions was to do with push notifications. I cant see how its even remotely possible so I’ll just figure it out somehow through RDS, dynamo db or who knows, maybe redis (another AWS offering).

The other reason I like using AWS is that I can build an AMI (Amazon Machine Image) which is ready to load into EBS (Elastic Block Store) at a moments notice and autonomously start a server through AWS scaling. In this way I can grow my capacity horizontally rather than vertically while maintaining high levels of availability. I have not seen Digital Oceans offerings so I have no idea if they can compete with AWS.

Quite possibly this may all be overkill as real world testing has not been carried out and when a client says “hundreds of thousands per second” you kinda smirk on the inside.

I agree with you that it’s hard to beat Amazon’s offerings for both scalability and cost.

It is possible to contact all sessions spawned from one app, but that won’t work in a multi-app load balancing situation like this.

Which DB are you using? I use PostgreSQL’s Listen/Notify protocols to communicate between clients in one application and it works well. I think you’re planning for one central DB, correct? Then the Listen/Notify mechanism should work for that. Other DBs may have something similar.

Edit: Forgot to mention that Xojo supports PostgresSQL’s Listen/Notify natively: http://documentation.xojo.com/api/databases/postgresqldatabase.html#postgresqldatabase-listen

I’ve used Postgres a few times (client request) but it was just treated like another relational db. Thanks for the tip :slight_smile: