yeti logo icon
Close Icon
contact us
Yeti postage stamp
We'll reply within 24 hours.
Thank you! Your message has been received!
A yeti hand giving a thumb's up
Oops! Something went wrong while submitting the form.

Routing traffic internally on Rackpsace

Tony Scherba
September 17, 2012

With a couple of our projects we've had to move out a database, do replication and start doing load balancing recently. Django makes this incredibly easy and all you really have to do is point it to the correct IP address.

About two years ago we learned a fairly large lesson when we set this up for the first time. We set the IP addresses to the public ones we use in our DNS.

DO NOT SET YOUR APPLICATION UP TO USE EXTERNAL IPs. We ended up with a huge bill that month since it turns out we were routing all our traffic outside of Rackspace's cloud and then back in, which significantly upped our outgoing bandwidth which rackspace is now currently charging at 18cents/GB. In a high traffic environment this can add up to some high numbers which are not good for your bank account.

After spending some time talking to Rackspace Support, the solution, as you can probably tell, was to route traffic inside the Rackspace cloud and behind their subnet mask. So to find the IPs to use ssh into each server and run...

ifconfig eth1

...and that's it. This will spit you back what Rackspace uses internal and thusly what you won't be charged for. Eth0 will be your external IP. Change this in all the appropriate locations.

Note: if you're running VPNs/firewalls be sure to change your iptables as well

Tony Scherba is a CEO + Founding Partner at Yeti. Tony has been developing software since high school and has worked on digital products for global brands such as Google, MIT, Qualcomm, Hershey’s, Britney Spears and Harmon/Kardon. Tony’s writing about innovation and technology has been featured in Forbes, Huffington Post and Inc. At Yeti, Tony works on strategy, product design and day to day operations, hopping in and working with the development teams when needed. Follow Tony on Twitter.

You Might also like...

VIDEO: Building API's with Django and GraphQL

At our last Django Meetup Group event, Jayden Windle, the lead engineer at Jetpack, an on demand delivery company, talks building APIs with Django and GraphQL. Watch the video to learn more.

Using Pytest to Write Beautiful Tests and a Bulletproof Django App

At the last meeting of the San Francisco Django Meetup Group, Wes Kendall gave a talk on how to make a bulletproof Django application by testing it with pytest. Check out his talk here!

Creating a Reusable Component Library: Yeti Lunch and Learn

Part of the Yeti Lunch and Learn series - our amazing developer, Resdan, gives a presentation on creating a reusable component library. Enjoy the video!

Browse all Blog Articles

Ready for your new product adventure?

Let's Get Started