Skip Navigation
  • so I've never actually used nginx or made any application 0-1 so I can't help with the actual work, just general architecture advice since I only code for work

    anyways, I think the nginx config I was talking about is proxy_cache_min_uses

    So the idea is that in real life content hosting, a lot of resources only get accessed once and never again for a long time (think some guy scrolling obscure context late at night cause they're bored af), so you don't want these to be filling up your cache

    It will take a lot of time to develop but you can optimize for that fact that videos/context are often either 1 hit wonders like the aforementioned scenario or have short lived popularity. I.e. a video gets posted to hexbear, a hundred people view this video over 1 week so you want to cache it, but then after the post gets buried, the video fades back into obscurity, and so you don't want this thing to outlive its usefulness in the cache

    There are some strategies to do this. This new FIFO queue replacement policy deals with the 1 hit wonder situation https://dl.acm.org/doi/pdf/10.1145/3600006.3613147

    Another strategy you can implement, which is what YouTube implements, is that they use an LRU cache, but they only cache a new item when a video gets requested from 2 unique clients and the time between those 2 requests are shorter than the last retrieved time of the oldest item in the LRU cache (which they track in a persistent metadata track along with other info. you can read the paper above to get an idea of what a metadata cache would store). They also wrote a math proof that supports this algorithm being better than a typical LRU cache

    Also I assume nginx/you are probably already going this but caching what a user sees on the site before clicking into a video should all be prioritized over the actual videos. I.e. thumbnails, video titles, view count, etc. Users will scroll through a ton of videos but only click on a very few amount of videos, so you get more use of the cache this way

    I'll try to dig through my brain and try to remember other optimizations YouTube does that is also feasible for tankie tube and let you know as many details as I can remember. This is all just my memory from reading their internal engineering docs when I used to have access. Most of it is just based on having a fuckload of CDNs around the entire world and the best hardware though

  • I devote exactly half of it to a nginx cache for the object storage. It caches for up to a year.

    I bet there's a ton of low hanging fruit optimizations to be done with the caching

    I couldn't find Nginxs replacement policy but I'm going to assume it's LRU like 99% of everything else

    Can I ask what your current caching strategy is? Like what/how things gets cached

    I.e. what types of files, if any custom settings like this file needs to be requested at least 5 times before nginx caches it (default is once), etc.

  • his body was discovered by an agent of the SVR, Russia’s foreign intelligence service

    So I guess he got killed for collaborating with foreign countries and risking national security?

  • It's good but "How I'm Feeling Now" is better if you want to check out Charli's best works

  • I don't give a fuck if the frozen waffles that I bought from corrupt supermarkets have a risk of listeria

    I used to be addicted to oxys and codeine when I was 14 and I still sniff strangers' coke and ketamine whenever I get offered them

    https://vm.tiktok.com/ZMh5XsfU6/

  • China didn't give them Marvel or Taylor Swift are literally the reasons why, it's genuinely not that complicated

    Hollywood media is incredibly popular in Vietnam

  • No

    The worst part is that all your coworkers are largely happy bootlickers so good luck doing any sort of unionizing or push back against anything

  • and the whole country is on the tipping point of becoming a fascist regime.

    Why would I, a red fascist hate this?

  • state sponsored play parties to fix birth rates when

  • China already has 7nm chips which and close to 4nm. Samsung's flagship is a 4nm and Huawei's flagship with a 7nm is only a little weaker

    any drone big/heavy/strong enough to fly through a little wind, especially if they're carrying a live load will be relatively large compared to these smartphones

    ik there's other factors like heat and energy usage but those can be supplemented by other factors like better batteries, and is a much bigger concern for data centers and smartphones carried by humans all day long

  • The Dems are constantly helping the wealthy oppress and exploit the poor and queer people are on average, pretty poor. Since the poor obviously suffer more from a stronger capitalist class, the Dems are effectively pushing queers down more than the rest of the population

    The average trans woman I meet is borderline homeless, all the things you've mentioned hardly matters to them if they can barely survive because of how difficult it is to just live in America

    How about removing every single barrier LGBTQ+ have to health care access?

    The biggest barrier queer people have to health care access is the lack of socialised healthcare, like everybody else. I don't know what barriers you're talking about but this is the biggest barrier for everybody in America. I think the average American with < $1000 in savings would rather have free doctor visits than whatever you're talking about. And again, because the average queer person is much poorer than the rest, this disproportionately affects them more

  • it's cutting edge, extremely massive and utterly immobile particle accelerator lithography machine in Xiong'an New Area instead of Xi'an?

    I don't think super small chips that are mostly for C/GPUs and overpowered smartphones are gonna be that important in World War 3

  • Attacking a nuclear power is insane, but there's not that many places left for the USA to go

    I don't think the US would give a single fuck if DPRK nuked ROK, and they almost certainly wouldn't do that unless existential I think

  • Instagram coders could never figure out this level of programming ingenuity

    Babies relying on people having an unlimited gigabit data plan that costs 80 a month and throttles your ass anyways after 20 gigs

  • Okay wait but Putin's birthday also being October 7 is some real 👁️ shit though

  • Impressive, I only paid with credit cards, never missed any payments for years and hovered low 700s the entire time until I was late on one payment and I dropped almost 100 points when I checked 3 months later lmao

  • technology @hexbear.net

    CapibaraZero - easy and cheaper DIY alternative to FlipperZero on an ESP32

    capibarazero.github.io /docs/docs/intro/
  • news @hexbear.net

    Biden Administration Ratchets Up Tariffs on Chinese Goods

    web.archive.org /web/20240913170517/https://www.nytimes.com/2024/09/13/us/politics/biden-tariffs-chinese-goods-clothing.html
  • Chapotraphouse @hexbear.net

    On 9/11, this ClA agent with poor acting skills does interview with Fox News to control the narrative while his handler watches him carefully nearby

  • Chapotraphouse @hexbear.net

    On 9/11, this ClA agent with poor acting skills does interview with Fox News to control the narrative while his handler watches him carefully nearby (watch until the end)

  • technology @hexbear.net

    Tech bros coded a complicated machine learning feature to insert people into photos just so they wouldn't have to ask a stranger for help with a photo - Pixel 9's Add Me

    store.google.com /intl/en/ideas/articles/pixel-add-me/
  • technology @hexbear.net

    Get the fuck off big tech photo storage apps if you're still on them for some reason. Coworkers have been discussing gen AI photos in your gallery

  • news @hexbear.net

    Telegram Founder’s Arrest Part of Broad Investigation, French Prosecutors Say

    web.archive.org /web/20240826200840/http://nytimes.com/2024/08/26/business/telegram-founder-arrest-france.html
  • technology @hexbear.net

    Retired Amazon VP: The CEO of a startup I worked for seduced my wife in direct retaliation for my pushback in the office, directly leading to my divorce.

    levelupwithethanevans.substack.com /p/my-ceo-seduced-my-wife
  • em_poc @hexbear.net

    Black transmascs and east asian transfems, do the racist stereotypes of your race being masculine/feminine make you suspicious/mad when you pass?

  • Games @hexbear.net

    Vice-presidential candidate Tim Walz once endorsed a high school Valorant team

    msn.com /en-us/news/us/vice-presidential-candidate-tim-walz-once-endorsed-a-high-school-valorant-team/ar-AA1omBPZ
  • chat @hexbear.net

    asd

  • chat @hexbear.net

    Anybody realize English language female dominated chronically online culture is largely media consumerism while male ones are just white supremacy?

  • videos @hexbear.net

    What if a Beautiful Black Girl was speed dating on the streets of Seoul?