1

First what is the best way to install Sphinx on a centOs server

rpm -ivh http://sphinxsearch.com/downloads/accept.php?file=sphinx-2.0.6-1.rhel6.x86_64.rpm
yum install sphinx

didn't seem to work.

Also, my set up is one app server, and one database server. The app server runs Magento, where it has the new module the works with Sphinx but, it's unclear both on Sphinx docs as well as any google searches, which server Sphinx should be installed on for the best effect.

MadHatter
  • 78,442
  • 20
  • 178
  • 229
Quantum
  • 75
  • 1
  • 12

2 Answers2

3

First, you'll want to link to the file directly, not to a web form.

rpm -ivh http://sphinxsearch.com/files/sphinx-2.0.6-1.rhel6.x86_64.rpm

Most of the documentation I have read says that Sockets are going to be faster than TCP/IP for lookups, and considering that Sphinx will be obtaining/parsing the data from mysql, it being able to obtain that information as directly as possible would seem to be the most sensible thing.

The obvious gotcha here would be how much work will be done on each side, if your app server has a consistently lower load, the slight overhead of TCP/IP would probably be worth accepting to not slow down your SQL server any more.

NickW
  • 10,183
  • 1
  • 18
  • 26
  • so you believe if the app server is always under load, which if you know about magento at all you'll know it is like that, then I should put Sphinx on the db server and since I'm already dealing with the latency of any query now, that this approach is best? – Quantum Mar 20 '13 at 18:08
  • IMHO yes, especially if you're going to be using big data sets, better have sphinx obtain it locally, then send the processed data over the network to you. – NickW Mar 21 '13 at 09:15
  • Super, I'll reset everything and doing it again this way. – Quantum Mar 21 '13 at 15:24
  • Best of luck!!! – NickW Mar 21 '13 at 15:27
  • so there is one more considering fact in the choice of where sphinx is installed that was not accounted for. Does the app that uses the sphinx api, need to start, reindex etc which I guess needed the demon. If so then it needs to be on the same server. – Quantum Mar 23 '13 at 23:42
0

First, I don't feel comfortable directly installing packages via HTTP. I prefer to download the package with wget or something similar, verify any md5sums and make myself comfortable that I have an untampered package. If those pass then I install. Just something I do and something to consider in the future.

Second, I think it all depends on the current, and future, load of the app server. If you don't anticipate an overwhelming load to it, and the current webserver is standing firm, then I would install it on the app server. Not knowing exactly what the install's dependancies are, I think configuration would be easier this way especially if it requires apache. Installing sphinx on the DB server may also require apache there which would add to the load on that box.

Lastly, in regards to "best effect" I think you have to know what your expectations are for the application. If milliseconds matter to you, then you'll want to go with the fastest route to the data and build your architecture to support that. If they don't, then having the DB on a second server, which is probably within the same network anyway, and connecting via tcp/ip is going to be fine. But again it's all in what you expect.

Ken S.
  • 479
  • 5
  • 14