![]() |
Dynamically Linked Source - Speed Up Your Multiple Site Network & Upgrades
For the purposes of this documentation, "Network" refers to a group of forums on a single server or cluster of servers.
When 3.7.1 PL2 was released, I posted over at vbulletin.com lamenting the fact that I had 15 upgrades to perform and how it would be nice to have a multiple site license to lighten the burden of downloading each install separately. In the end, I spent much more time coming up with this system. Dynamically Linked Source or DLS allows operators of two or more forums on the same server or cluster, for all intents and purposes, to use one set of source code instead of multiple sets. By using one set of source code, Op code caching is much more efficient as only one copy of the source is cached. This greatly reduces the amount of memory used caching the source code, and also makes it more efficient. It will lead to less fragmentation for systems using APC, XCache, eAccelerator, or other such methods of caching Op code. The method uses symbolic links to a central repository of the source code. Therefore, upgrades to all sites on the network can be done quickly by just replacing the source. For patch level releases, this means the entire network can be patched with one upload. Upgrades to a new version can be done this way, or a new repository can be created and each site can be upgraded one at a time. The issue of licensing has also been addressed. Once the product file is installed, and assuming the installation instructions were followed, each installation will report the proper license key when salting cookies, or reporting back to Jelsoft as Vbulletin does from time to time (mostly in the AdminCP). I contacted the development team at Jelsoft and discussed this method before releasing it, and got the OK from Mike. I was initially concerned that it may break licensing or perhaps give away too much of the license reporting methodology, but now that I look back, it really does not do either. In tests on a rather large network that contains seven forums with about 7 million posts, hundreds of thousands of registered users, and uses three load balanced servers the load has been reduced by almost 40%. You can see in the graph attached to this thread for the particulars. I have tried to make the readme as clear as possible, but honestly that was never one of my strong points. I cannot emphasize more that before you implement this method, TEST it first in your sandbox. Also, make sure you backup your software and database before you use this. I also have included a PDF that explains what is happening in greater detail. Updates: 8/20/08 - This will work with the latest version of VBSEO (3.2.0 at this time). Add all the files to the DLS except the config file, and run the php-clone.php script. This product was developed for Andy R from Social Knowledge and released here for others to enjoy. Please don't forget to click install as I have worked quite a while on this. :) |
Reserved...
|
This is very interesting. I'll be testing this one.
|
awesome. exactly what I need. will test. :D thank you!!
ps. er... how do I sandbox test this for multiple boards? do I ahve to set up a multi-board test as well? :( |
Installed and rated! ;) thanks a million man.
|
Quote:
Just remember, BACK UP EVERYTHING! The php-clone.php script DELETES your forum source code files and then replaces them with symbolic links. Should you configure it wrong, you could find yourself with no forum software. :) A quick backup of the source files will correct that quickly. I also recommend backing up the database, not that this product/method does anything to the database, it is just for prudence sake... |
Wow, this is a great idea. I'm going to check this out once I get some free time.
|
This looks great and its going to be a blessing for those running multiple forums. I assume each sites keeps its own DB? How are mods and plugins handled? I assume they are excluded?
|
Quote:
You can link any file just by adding it to the DLS source and running the php-clone.php script. |
*VERY* interesting and I love the out-of-the-box thinking. Truly impressed. Do you know whether this will impact vbSEO? Would it be possible to also include vbSEO in the DLS or isn't that necessary?
|
The sites we tested on were using VBSEO and VBACMPS with no affect. You just have to make sure that you have the latest version of VBSEO..
I will be working on including VBSEO into the DLS. Initial work on it has yet to be of any success.. |
Quote:
|
Wait does this mean I only need one VBulletin license for all my domains now or no?
|
not at all.. you still need your proper licenses.
|
Quote:
|
Hmm, I got a notification saying someone asked "any chance for memcached support?" but it isn't here. Well, the answer is, it does support memcached.
|
This is a premium add-on. Great effort and taking things into your own hands as many of us do.
|
Quote:
|
I think they did some sort of database restore, because I had a PM I know I read already, yet it showed as new again..
|
wow you have really gone and done a great job here. i currently have 2 forums running on my server, however as I expand I will really have to go and look into this more.
|
Quote:
|
I do want to take an opportunity to clarify something I think may be unclear.
When you install this, you define a license key for each site using the DLS system by entering in the license #. This license # that you enter will be used throughout the script for the site it is defined for. This in no way bypasses any licensing methodology in the script. If you enter an invalid license # or a license for a different site than what you defined at vbulletin.com, it will still throw up the red flags for Jelsoft. The only thing the plugin does is make sure the proper license (as you define it) is returned when called. We contacted the VB team about this and they detailed to us where these areas were so we could build this system without stepping on any licensing issues when it came to their piracy protection schemes. If you try to use this to have multiple copies of the same license running, it will still be identified exactly the same way it would if they were separate installs. |
I wonder if this would work on Windows servers ... I suppose not ... (sigh) ;)
|
This is brilliant. Thank you! :)
|
Quote:
|
Quote:
|
This really sounds great!
|
Quote:
|
Where do you put the path to the forum in? there is one line in php-clone.php that says Path to the forum not forums, which path is this?
Edit: and also how are you able to upgrade the databases or is it just files this updates? |
Quote:
|
Quote:
Code:
$oldls = './public_html/forums'; Code:
$oldls = '/some/pathto/public_html/forums'; |
Quote:
|
great mod. so if i understand whats going on here, this mod will let me upgrade multiple forums on the same server, under different domain names (or accounts on the server), as long as i input the license information properly, it will upgrade all the forums running the software at one time?
seems like a really great mod here. i am old fashioned and enjoy upgrading the forums one at a time, and download each script for my domains individually. not all forums can be upgraded to the same version, due to hacks/addons from here that might be out dated, and forum owners dont wanna loose them... but i do need a better understanding of this mod. does the server need any pre-req software or modifications to it or is this a out of the box kind of mod because i am not server smart, i understand real basic stuff, and i see things in here like OP code and that throws me for a loop like am i suppose to look for something to make this work right...the link in your PDF for opcode is not working so i cant get information on it. anyways, if you could answer my question id appreciate it. this mod just lets me upgrade multiple forums that are installed on the server in 1 shot? thanks and good job, been a while since i seen a mod like this that really benefits the server instead of its users. |
You can use it to upgrade multiple forums at once if you want to, but I would recommend creating a new source repository and upgrading your forums one at a time just for the reasons you laid out.
Opcode caching is basically this. When a PHP script is executed on your server, the server reads the script, compiles it, and then executes the compiled code (op code). It does this EVERY time the script is called. Of course, there is a lot of overhead compiling the source over and over so caching will only compile it once and then the server will use the compiled code saving you A LOT of memory and CPU. When you run multiple forums on a server, and you are using opcode caching, each forums file will be cached even though for all intents and purposes, they are the same files. By allowing all the forums to share one set of source files, they are only cached once. So index.php on forum1 and index.php on forum2 are only cached one time when you use the DLS as opposed to twice. This cuts the memory usage for cached files in half. If you are not comfortable with your server prowess, you may want to test this on some test installs before you try to do it live. ;) |
Quote:
It may work with IIS, but I won't use IIS for other reasons ;) |
Hmm, I know very little about Windows servers, but could you not associate the ink file to run as PHP?
|
Quote:
If I run the file first (then it's in the cache), the file link works. However after restarting Apache the cache is empty and it would fail with a 404 error. Ok nevermind, it's a great solution for Linux, and there it'll surely apply :) |
You can use hard links on windows and it works (just tested). A hard link basically means that if you change either file, the other one will also be changed. You can create a hardlink on windows like this:
Code:
fsutil hardlink create newfile.php oldfile.php EDIT: If you try using hardlinks, I'd like to know if the opcode caching sees them as the same file or separate files. |
That would be ideal. Otherwise it is only good for patch releases.
|
Quote:
|
All times are GMT. The time now is 07:14 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|