7 ms·
How YouPorn Uses Redis: SFW Edition
- moron4hire 13y agoI read as far as "we decided to use PHP" before I decided there was no way anything they had to say would be relevant to anything I care about.
- octo_t 13y agoI find how porn sites run things far, far more interesting than how generic start up X runs things and I'm not sure why. I think in general its because my friends who work at start-ups doesn't really stop gushing about how MongoDB or Go or Redis is amazing and fixed all their problems, whereas porn sites/porn industry in general is talked about far less.
- lmm 13y agoBut this article is not about the porn side. The tech tradeoffs are basically the same as in any industry - this article could have been written pretty much word-for-word about many non-porn sites.
- gee_totes 13y agoYes and no. There are 2 things unique about the adult industry: 1) Extremely high levels of traffic. Furthermore, when it's a video site like YP, you've got people engaged and watching videos for a longer time. 2) Common cloud infrastructure is normally off limits. Running adult content from AWS or Linode is forbidden by the TOS, so you have to roll your own servers. The guy in the interview, Eric Pickup, has a very good talk about his software stack and the amount of traffic that YP gets. https://www.youtube.com/watch?v=RlkCdM_f3p4 https://www.youtube.com/watch?v=RlkCdM_f3p4
- TheHippo 13y agoIt would be much more fun if this was hosted on YP.
- zhemao 13y agoI'm assuming that's where the NSFW version of this article is. It probably has more risque photographs than one of a cat, keyboard, mouse, and right hand. Of course, the photo might have some subtle implications. For instance, where's the guys left hand????
- kiiski 13y agoWhen I read the title my first thought was "How can you write NSFW article about using redis?". After doing a quick google search and looking through youporns blog, I figured the title is just misleading and no NSFW version exists.
- Killswitch 13y ago> 2) Common cloud infrastructure is normally off limits. Running adult content from AWS or Linode is forbidden by the TOS, so you have to roll your own servers. Where do you get this? I've worked in the porn industry for 12 years and have ran porn sites on both Linode AND AWS... They allow it. That being said, we do things very differently in porn than in the startup world I have come to notice. Most startups scoff PHP, whereas 99% of the porn industry is based on PHP. Not to mention we handle HUGE traffic loads on single servers, and the only time we ever have more than one server (outside of the sites sub 1,000 Alexa) is just for media such as pictures and videos, which are only offloaded to handle as static content while the rest is dynamic.
- gee_totes 13y agoOh, I could be wrong. I worked for an Adult Friend Finder type site and we had a very tough time finding a place to host the site. Did you guys use any of the crazy file systems, like MogileFS?
- Killswitch 13y agoThat's weird, as there's tons of very good adult specific hosts out there. Crazy file systems? No. Just standard LAMP stacks.
- troels 13y ago> Most startups scoff PHP, whereas 99% of the porn industry is based on PHP. Only the vocal ones. I find that PHP is used a lot more than what the chatter on HN might lead one to think.
- Killswitch 13y agoThat's why I rarely take anything these people say seriously. I mean, they talk trash about PHP and how it's horrible but look at the porn industry? We push millions of visitors a day over a typical LAMP stack... But hey, it's shit, right?
- 13y ago
- nrivadeneira 13y agoI think the point octo_t is trying to make is that you don't really find blog posts on porn sites that exclaim how awesome their stack is or postmortems on their latest attacks. They just take care of business instead of taking part in the common masturbatory technical blog post (pun intended).
- deleted 13y ago[deleted]
- lmm 13y agoFrom the stories on HN one would think that everyone who used memcached is replacing it with redis. Is that really the case? What are the differences and similarities?
- justinmares 13y agoHere's a pretty good comparison of the two - http://stackoverflow.com/questions/10558465/memcache-vs-redis http://stackoverflow.com/questions/10558465/memcache-vs-redi.... Disclaimer: I wrote the above article and work for RedisToGo. But that article is unbiased :)
- cookiecaper 13y agoMy experience has been that many people are using redis instead of memcached. I haven't switched myself, but it seems some frameworks of various types (ServiceStack, Resque, others) build in a Redis-based caching mechanism, and that's driving most of the adoption for Redis-as-a-cache. Perhaps some of the motivation is that it's easier to kinda-sorta run Redis on Windows than it is to run memcached on Windows.
- samwillis 13y agoI suspect that most of it is that you can kill two birds with one stone by using redis as your task queue. That's what I do.
- rsynnott 13y agoMemcached has been running on Windows for a fair bit longer than Redis, and it's in mainline Memcached, though not mainline Redis, now. Of course, neither are necessarily that production-tested, but most people wouldn't be looking to use Windows servers anyway.
- fizx 13y agoMemcached has some rough edges (e.g. slab size management) that aren't there in Redis. Redis also gives you a couple extra useful primitives.
- jaytaylor 13y ago
- vijayboyapati 13y agoThe thing I find interesting about this article is the brief discussion about the death of PERL. In particular the comment about the inability to find senior developers in PERL. This is a sad development for those of us who really love programming in PERL, but I think eventually one must recognize that a language is fading, however slowly, into obsolescence. Apart from Crowdtilt I don't know any other successful startups or major companies that rely on PERL. And if one wants all the benefits of a network effect of developers, libraries and technical support, it seems today a backend developer really needs to shift his or her focus to Python, Ruby or (bleagh) PHP
- byroot 13y ago> In particular the comment about the inability to find senior developers in PERL. One thing to know is that Manwin (youporn, pornhub, etc parent company) is located in Montreal. For a reason I can't really explain, you mostly find PHP and C# developers here, so most Montreal startups are PHP based. I also interviewed a couple Manwin alumnis, and they told me that they were a couple hundred developers and that there is a huge turnover (you often see a 6 month / 1 year experience at Manwin when you read a PHP dev resume). So it's easy to understand that they prefer to use the local dominant language, it do not mean that Perl is globally dying, just that they have specific constraints. And to be fair Perl is not the only small community in MTL, Ruby and Python also have a strangely small community here.
- euphemize 13y agoother Montrealer here - I also wondered why that is. Especially considering the amount of gaming companies around here, you'd think a lot of C++ would be in order. I have met quite a few rubyists, but python seems rarely used. PHP coders were always available, wherever I lived though :)
- canadiancreed 13y agoI've found in my job searching over the last few years that if you have a resume with good ruby chops, Montreal is the place to go. Seems to have the largest share of jobs in that area, at least from what I've seen.
- troels 13y ago> Previously we’d been experimenting with Redis, Varnish and a few other technologies. I read this paragraph and was a bit baffled. It sounds like they had merely been toying around with Varnish. I would think that heavy edge-level caching was essential to keep that kind of site up. Considering most content probably isn't personalised, it's basically a matter of serving a lot of static content fast.
- nasalgoat 13y agoThey might be using Squid, which was the cache server of choice in the mid-2000s in the porn industry and was heavily used.
- troels 13y agoYeah, that's probably it. I read it as if they only recently looked into http caching, but it may just be that they recently looked into that specific tool. Makes more sense then.
- weego 13y agoI really doubt that could be a less interesting or valuable use or the interviews, the interviewees or any potential readers time. In Summary: we took a perl site, changed it to php and implemented Redis because it is good at lists. I don't really have any specific tips on Redis or any details of clever implementation approaches.
- snitko 13y agoI know it's slightly offtopic, but can somebody please explain how YouPorn and similar sites make money?
- netcraft 13y agomostly advertising.