
How YouPorn Uses Redis: SFW Edition - benarent
http://blog.togo.io/redisphere/how-youporn-uses-redis-sfw-edition/
======
vijayboyapati
The 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

~~~
avar
It's interesting that someone who professes loving to program in Perl refers
to it as "PERL". People who refer to it in all-caps instantly give themselves
away as outsiders to the language. It's like someone claiming to be a senior
JAVA programmer, it's not an acronym.

Anyway we use Perl pretty much exclusively at Booking.com, and I'm pretty sure
we're at least a couple of orders of magnitude bigger than the likes of
Crowdtilt. There's a bunch of other interesting companies using Perl as well,
a lot of them just don't make as much of a fuss about it as the companies
using say Ruby.

Last I knew e.g. Morgan Stanley used it for most everything, including new
developments, and it alone probably employs more programmers using it than the
combined hobbyist contributor base of some newer emerging languages.

It's pretty hard to claim that Perl is "dead" and square that with the ongoing
activity on the CPAN
([https://metacpan.org/recent](https://metacpan.org/recent)). This is not the
kind of activity a dead language gets.

I think what a lot of people mix up is that just because something isn't as
big as it was before doesn't mean it's dead.

C isn't as big relatively as it was in the 80s, Perl isn't relatively as
ubiquitous for scripting and web development as it was in the 90s, but neither
of those languages are dead.

If you look at the total amount of contributions / software written for any of
the languages that aren't currently in the spotlight you'll most likely find
that we're at the high water mark of the number of the amount of software
written in them, and the number of people that have been employed to write
software in them, just because the industry as a whole is getting bigger every
day.

Maybe they're not bigger _relatively_ compared to some other languages. But
that has little bearing on how good they are when it comes to using them in
your toolchain. If anything they're better than they've ever been before.

~~~
ape4
PERL -- Practical Extraction and Report Language
[http://www.cs.cmu.edu/htbin/perl-man](http://www.cs.cmu.edu/htbin/perl-man)

~~~
leont
That is an unofficial manpage for perl 4, a release that has been obsolete
since 1994…

------
octo_t
I 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
But 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
Yes 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)

~~~
Killswitch
> 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.

~~~
troels
> 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
That'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?

~~~
kbenson
It's important to differentiate when people are complaining about the language
and it's use, and how effective it is. Almost nobody criticizes PHP
performance (relative to other scripting languages), whether not not it is
technically faster or slower than another language. Then, even a good portion
of the criticisms of the language come with the caveat that it does let you
get simple stuff done quick.

My main problem with PHP is that I'm primarily a Perl dev (but have done some
heavy PHP work in the past), and it's syntax is _just close enough_ to make me
always aware of how unintuitive it is in comparison, and all the extra steps I
have to take to accomplish something simple. It's maddening.

------
lmm
From 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?

~~~
cookiecaper
My 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
I 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.

------
troels
> 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
They might be using Squid, which was the cache server of choice in the
mid-2000s in the porn industry and was heavily used.

~~~
troels
Yeah, 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
I 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
I know it's slightly offtopic, but can somebody please explain how YouPorn and
similar sites make money?

~~~
netcraft
mostly advertising.

------
moron4hire
I 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.

