+3
Save

[AskSnapzu] What does your current stack look like?

Personally I'm rocking the following. Simple but yeah, please don't hate on the /t/php

Ubuntu - /t/ubuntu - Was a FreeBSD guy back in the day, have changed to Ubuntu ever since 10.04 I think.

Nginx - /t/nginx - I've found Nginx to be the most flexible front end option out of all the web server software I've used over time. I really don't know what I would do without it and it's ability to perform the impossible.

PHP - /t/php - I've been coding in it for 15 odd years, I should change to something else, I want to. I've seen the bad code out there, I hate that it's what is causing the world to hate PHP, but you have to look at all the other highly successful sites that run on it. Please don't let the bad code influence what other good coders are doing. I don't use a framework... bite me :D

MySQL - Did I really need to mention this ? I'll probably look at PostgreSQL at some point, but for the moment MySQL does everything I need. Add MySQL-Proxy on the side for some additional help for software I can't modify.

Memcached - Used for sessions as well as result caching. Also used to communicate PHP <-> NodeJS for some things.

SphinxSearch - Nice fast database search. I was able to use MySQL-Proxy to intercept slow "LIKE" queries from a certain piece of software I couldn't modify, extract the params, send them to Sphinx. Have it dump the results to a file, then read the file back into MySQL-Proxy rewriting the query and cutting the result return time down to a few seconds rather than 10+ seconds.

NodeJS/Socket.io - Chat server as well as other UI communication. Expanding it further at some point to eliminate feed style calls with all data sent via a socket rather than to an endpoint.

Expanding a little to show development software used. phpStorm, SQLYog, Git, YUI Compressor, Less, lots of bash scripts for compressing CSS/JS as well as bundling code.

8 years ago by Kysol with 4 comments

Join the Discussion

  • Auto Tier
  • All
  • 1
  • 2
  • 3
Post Comment
  • the7egend (edited 8 years ago)
    +1

    Stack:

    -Ubuntu 12.04 LTS -Apparmor
    -nginx with SPDY and Forced-SSL enabled
    -PHP-FPM
    -MySQL (Tried Maria, Quit Life, Went Back to MySQL)
    -Memcached and memcache
    -SphinxSearch (Bane of my Existence)
    -PHPMyAdmin
    -Postfix
    -LXC/LXD for everything.

    • Kysol (edited 8 years ago)
      +2

      I thought SPDY was getting shelved. I tried to install it back when they first announced it, but generally didn't bother with it after that.

      Also I hear you with Sphinx. When it comes to building product searches, you can never make everyone happy. They want X, but not Y. Then someone wants X+Y but not Z. First person chucks a fit because Y is showing up but not Z. I just gave up and went, you know what, what you have is good enough. Search properly if you want results to be right.

      Might be just me, but I've found that I need to put waits in some time to allow Sphinx to actually return a proper result set. The API comes back with results, but not all of them. If I do a search, wait 1 second, then do the search again, I get the full result set. Probably just the version of the API I'm running.

      Oh I highly recommend SQLYog as a MySQL client. Connect to your database via a SSH tunnel (built into the program) to remove the need to have PHPMyAdmin installed on the server. That is i'm guessing you'd have MySQL bound to a local address and not externally accessible.

      • the7egend
        +1

        Yea, SPDY is going the way of the buffalo, making way for HTTP/2 but I still have it enabled on my prod and dev, it's easy to kill just really haven't got around to doing it. I still think that HTTP/2 is using SPDY in some sense though, I haven't really looked into it lately though, been mostly focused on FrontEnd instead of BackEnd stuff.

        As for Sphinxit took me ages to get it working just right, I think it honestly works on borderline black magic and I'll always forget about indexer on the first time I setup a server and I'll wonder why I've got no results. Helps if you index everything first.

        • Kysol
          +3

          I always joke with people at work when they want me to reindex stuff... Knowing that --rotate allows for searchd to not go down, I joke with them "If people can't search properly because I'm indexing 3 million odd products" points at them... "your fault". Generally happens when a product is added to the system and they want it searchable straight away.

          What they don't realise is that everything runs like clockwork, and stuff happens when stuff can happen. As soon as you start demanding things to run at the drop of a hat, that's when things start to conflict and cause slowdowns.

          Black Magic... yes. How it works, I don't know. I get results, I'm happy.