How many CDN's do you need for avatars?
-
Don't bother replying until complete. Topic title will be changed..CompletedMoved posts from https://what.thedailywtf.com/t/john-lennon-is-a-hungry-hungry-hippo/54226 (Lounge topic.)
These are discussing the stuff needed to produce this post - not about the posts actual content...
But the test still has no worth.
: SOMETHING HAPPENED!
: Okay, what happened?
: The DoEverythingTest failed.
: So... what happened?
: Something that failed the DoEverythingTest, obviously. That encompasses... well, everything.
: Could you narrow that down any?
: You certainly didn't. Good luck!And this also does nothing for wrong-side failures, where it should throw an exception and doesn't. If this was that test, you now have to watch for a should-fail test that unexpectedly passes, or worse one that fails slightly differently.
-
The raw is beautiful
-
And will break some Discotime after Yami updates her avatar next.
-
I thought that was the permanent link? As far as I remember disco kinda does the right thing, but then adds a layer of
-
Discourse adds HTTP redirects from the old avatars to the latest when you update, instead of the much simpler and more intelligent updating the file.
-
-
So far so good...
-
Still looks reasonable, now with the new avatar
-
It looks like anything matching /user_avatar/what.thedailywtf.com/yamikuronue/120/[0-9]+(_1?)?.png will redirect to the avatar. Other variations will load either a 1x1 gif, or a "doesn't exist or is private" error message.
-
Right-click tiny avatar, open image in new tab. Image is 120 x120.
Right-click big avatar, open image in new tab. Image is 64 x 64.
-
Right-click tiny avatar, open image in new tab. Image is 120 x120.
The url specified the 120px size. You'd have to ask @TwelveBaud why he did that.
Right-click big avatar, open image in new tab. Image is 64 x 64.
Eh? Which avatar is that? When I right click the avatar on her posts, it's the 45 px version.
-
it's the 45 px version.
You're right. My error; I wasn't looking at the dimensions when I typed that, and
I experienced short-term memory failurean alpha decay flipped a bit in my non-ECC mental RAM.
-
I couldn't find any of Yami's posts/likes reasonably quickly, so I just ed her profile and grabbed the one there. Want me to edit it to the 20px version?
-
It has to do with this garbage. I think what it was intended to do is give you the specific version of the avatar you requested, unless you didn't request any specific version, in which case you get the latest, and "obvious crap" is redirected to :blankpixel.gif:. I think it bears about as much relation to following that intent as a swoopy doopy loopy goopy line does to "laser level".
-
Wouldn't that help prevent caching issues?
-
I'm surprised; we're almost two full days from the post quoting avatars, best part of two days since the avatar change and Discourse isn't broken yet.
-
Nope
-
I think what it was intended to do is give you the specific version of the avatar you requested
Which is already unnecessary. Why not just keep one version, with different sizes if needed and always show the current?
Oh, right, the same people who have a letter avatar CDN. Carry on.
-
Apparently the avatar CDN is optional now.
-
Apparently the avatar CDN is optional now.
As a result of excessive load on their servers, or them listening to users?
-
I doubt the latter so much.
-
The letter avatar CDN was optional from the start.
Discoadmins can choose from
a - default letter avatars come from a CDN
b - hosting their own letters but with a performance hit
-
Was it optional? I thought it wasn't initially.
Either way it's still fucknuts retarded.
-
Was it optional? I thought it wasn't initially.
If it wasn't optional from the absolute start, it was optional very soon after.
-
What does it default to though? I'm pretty sure it was defaulting to CDN when people upgraded, even if there was a way to turn it off...
-
Discourse isn't broken worse than usual yet.
I know you've been around here long enough to know that Discourse has never been not broken.
-
It defaults to DiscoCDN. IIRC we still have it enabled here.
-
Was it optional? I thought it wasn't initially.
It has been at least since 1.5 beta 2 (which we're on):
-
Why would they let you set the CDN URL?
-
Same reason you can choose where image uploads are hosted I guess; you put them on a server better suited to serving them
-
you put them on a server better suited to serving them
Like the same server the forum runs on? ;)
-
Like the same server the forum runs on?
what madness is this?! of course you don't do that! that would make the forum explode into an orgy of cooties!
-
b - hosting their own letters but with a performance hit
...every time the avatar is needed, iirc, instead of the sane approach, which would be taking one performance hit to generate the .png when the user registers and then using it as their avatar just like any other .png the user uploaded.
-
@RaceProUK said:
you put them on a server better suited to serving them
Like the same server the forum runs on? ;)
Sure, but if you wanted to, you could have the avatars on a server designed for fast serving of static files, and the forum on a server designed for running forum software.
-
The sane approach for displaying text in a browser is to display text in a browser.
-
I think there was some sort of caching, so like sometimes it generated a new one and sometimes not. Honestly I gave up trying to follow the retardedness of either solution a while back.,
-
You could but I don't see why you would.
-
You mean like nginx? Because Discourse comes packaged with at least two web servers and at least two database servers (plus a bunch of other stuff that is compiled during the install process and on every update).
-
-
The sane approach for displaying text in a browser is to display text in a browser.
It's not text. It's an avatar. Avatars are images. It happens to contain text. It is an image that happens to contain text. There are multiple different ways that you could handle that, but when you already have a system that handles image avatars just fine, that's the painfully obvious way that you should do it.
-
It's effectively the alt attribute for an image element, implemented in the least efficient way possible.
-
Because Discourse comes packaged with at least two web servers
i know it has nginx, what full stack webserver does it have sitting behind that?
least two database servers
postgres (stupidly configured to teh point where vaccuming the DB causes an outage) and redis (which is its own WTF)and don't forget sidekiq or whatever teh fuck that is that periodically gets poisin jobs that kill the forum for hours.
-
i know it has nginx, what full stack webserver does it have sitting behind that?
I think it's called Unicorn but I'm not sure.
-
@accalia said:
i know it has nginx, what full stack webserver does it have sitting behind that?
I think it's called Unicorn but I'm not sure.
... right.
that means somewhere in that image ther has to be something called rainbows, or possibly multiple things called raimbow, because how else could discourse be made of rainbows and unicorns?
-
It's effectively the alt attribute for an image element, implemented in the least efficient way possible.
No, it's not. It's a default avatar. I've never seen a discussion system that used a broken image and an
alt
attribute instead of a default avatar. Although now that I think about it, that sounds about as sane as what Discourse does.
-
Why would they let you set the CDN URL?
If you're using a SSO provider like Google Apps, Azure Active Directory, ADFS, Clearspace, et cetera, et cetera, you can leverage their single-avatar-provider service too.@ben_lubar said:It's effectively the alt attribute for an image element, implemented in the least efficient way possible.
If you paid attention to the ban.d thread where they discussed implementing the CDN (think it got starholed), you'd have read that they tried that and got inconsistent results, particularly in Safari. Using images allowed them to precisely control the presentation.@ben_lubar said:I think it's called Unicorn but I'm not sure.
It is called Unicorn, and that's how they parallelize their Rails app -- Ruby has a global interpreter lock, so only one thread per process can run Ruby at a time. Unicorn runs multiple Ruby processes that coordinate any Rails shared state. Because of the ActiveRecord cache in Discourse's configuration, each Unicorn eats about a gig of memory; to increase parallelism and reduce contention between the unicorns, they try (and fail) to use nginx for static content instead.
-
that would make the forum explode into an orgy of cooties!
Can we get a list of things that won't do that?
I don't think it'll be a very long list.
-
Can we get a list of things that won't do that?
Sure.###Things that won't cause Discourse cooties
- Not using Discourse.
- See #9.
-
Why would they let you set the CDN URL?
Futureproofing. A few versions from now, every forum will need a separate, dedicated cluster of servers to act as a letter avatar CDN. We're going webscale, baby!
you can leverage their single-avatar-provider service too.
That... sounds like a remarkably sane and useful feature for internal forums. I wonder if it was actually a conscious rationale for allowing people to pull default avatars off a service, or just a side effect of firefighting their shitty ImageMagick code...
-
A few versions from now, every forum will need a separate, dedicated cluster of servers to act as a letter avatar CDN
This is JeffCo. They'd just create a CDN of CDNs.