Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-17-2014, 02:22 AM
|
#1
|
LQ Newbie
Registered: Dec 2013
Posts: 28
Rep:
|
Local Caching Server !!
We're using video streaming website and want to cache mp4 files on local caching server to save the bandwidth. We have two servers, one in US and one is in our country's local ISP(Caching Server).
Request first goes to Main-server and it checks the client ip using nginx geo module in order to decide routing. Now we want to route any ip coming from our local ISP towards the caching server. Currently, we're using nginx geo module on main server located in US to check if the coming request is from the ip 1.2.3.4 and direct it to the local caching server.
Our ISP provided us with pools i.e 10.0.0.0/8 to route these ips on their local caching server.
The problem occurs now that we'll have to get the ip pools from our local ISP each time whenever they add the new clients to their network.
Is there a way to detect new ip pools automatically using some services maybe like BGP ? I've no idea about BGP but just heard from my friend.
If yes, how i am going to work with BGP ? Currently we're using nginx on both our servers.
Help will be highly appreciated.
|
|
|
06-17-2014, 03:23 PM
|
#2
|
Senior Member
Registered: Apr 2009
Posts: 1,889
Rep:
|
How does nginx decide route, based on routing table in kernel or configuration in nginx?
|
|
|
06-18-2014, 12:53 AM
|
#3
|
LQ Newbie
Registered: Dec 2013
Posts: 28
Original Poster
Rep:
|
>>How does nginx decide route, based on routing table in kernel or configuration in nginx?
Its nginx geo module, which supports CIDR notation to route that specific ip prefix towards the local caching server and rest will be server from the main server. I configured this module on Main Server because request first goes there, so nginx checks if the ip is 1.2.3.4 and it is added in geo {} so it'll route that ip towards the local caching server using proxy_pass directive of nginx.
http://nginx.org/en/docs/http/ngx_http_geo_module.html
|
|
|
06-18-2014, 07:07 AM
|
#4
|
LQ Newbie
Registered: Jun 2014
Posts: 4
Rep:
|
The server stores objects in serialized form in the cache. When a cache client requests an object from the cache, the server sends it to the client over the network. The cache client then deserializes the object for use by the client application. To speed up the process of retrieving an object, enable local cache. For more information about enabling local cache, see Enable Windows Server AppFabric Local Cache or Enable Windows Server AppFabric Local Cache (XML).
|
|
|
06-19-2014, 03:33 PM
|
#5
|
Senior Member
Registered: Apr 2009
Posts: 1,889
Rep:
|
The BGP is too big, normally it is used on backbone, not end user. You can use OSPF to get updated routing table. And then a code or script add these change into geo {}.
|
|
|
06-20-2014, 01:43 AM
|
#6
|
LQ Newbie
Registered: Dec 2013
Posts: 28
Original Poster
Rep:
|
Can following script help me for fetching the prefixs from ISP router (via ASn of ISP) ?
https://code.google.com/p/bgpsimple/wiki/README
I'll add this script to our local caching server located in ISP and fetch the ISP routing table feed using this script ? And than will sync this script to my webserver.
|
|
|
06-20-2014, 03:36 PM
|
#7
|
Senior Member
Registered: Apr 2009
Posts: 1,889
Rep:
|
I might be wrong. The script look like update entire routing table through BGP. Yes, you can use the script to update entire routing table in geo {}. If only doing different each time, it is better.
|
|
|
All times are GMT -5. The time now is 04:43 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|