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

By
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.

Connect with Tony on LinkedIn

You Might also like...

code on a computerManaging Persistent Browser Data with useSyncExternalStore

Struggling to keep React state in sync across tabs and sessions? Learn how to use useSyncExternalStore to manage state persistence with localStorage and sessionStorage—without complex state management libraries. Improve performance and streamline your app’s state logic.

software developerReact Hooks 102: When to Avoid useEffect

Overusing useEffect in React can lead to inefficient components and performance issues. In this post, learn when to avoid useEffect and discover better alternatives for managing state, calculations, and user events. Optimize your React code with best practices for cleaner, faster applications.

software developer codingFintech Security with GraphQL Shield

Securing fintech applications is crucial, and GraphQL’s flexibility can be a security risk if not properly managed. GraphQL Shield helps enforce fine-grained authorization using role-based (RBAC) and attribute-based (ABAC) access control. In this post, we’ll explore why authorization matters, how to implement secure, composable rules, and walk through a demo app showcasing best practices.

Browse all Blog Articles

Ready for your new product adventure?

Let's Get Started