Live data from Hacker News

How Netflix really uses Java

infoq.com

81–90 of 100 posts

Re: How Netflix really uses Java

#81
post #4

…let's say, your TV, or your iOS device will just do 10 network calls to these different microservices. It will just not scale at all. You would have a very bad customer experience. It would feel like using the Disney app. It's just not ideal. That’s some shade.

This seems really immature as well.

Focus on your own house. At the end of the day both Disney and Hulu work more than fine for me( I'm guessing it's the same team ).

Netflix had what, a decade head start. I'd expect them to of perfected streaming.

Re: How Netflix really uses Java

#83
post #3

In theory... would Go be (1) as performant for Netflix's scale/speed needs, and (2) be practical in 2024 from a platform/ecosystem perspective?

I mean...PHP/Hack works for Facebook's scale, so it's not really a black+white question.

Go will give you lower memory usage, less abstractions, and the ecosystem has fewer observability tools.

Re: How Netflix really uses Java

#84
post #80

Earlier quoted context omitted.

> making their monolith easier to manage (Google/Facebook) Google has Borg. They literally invented Kubernetees to make their microservices easier to manage. --- Don't confuse mono/microservices with mono/micro repositories .

I'm aware of that. I was talking about their modified version of Subversion.

Right. Google has microservices, in a monorepo.

Re: How Netflix really uses Java

#85
post #7

I never worked with micro services, but I have this question. Do micro services require more and better management? I can imagine that you need to keep track of all these services, along with information about dependencies, code version, API version and others. Of course, monolithic services also require these this sort of management, but it should be less complex.

The whole microservices thing is a little crazy. Someone just looked at what devs came to realize worked well, slapped a name on it and it blew up as a hot thing. Since then, I've seen so much wrong done in the name of 'microservices'. It shouldn't be some aspirational goal to work with them. Also, the fact that the word 'micro' is in the name makes the cargo culters split atoms to reach some tiny nirvana. The size i…

The “micro” moniker is very unfortunate. I have seen architectures where endless strings of lambdas are strung together like function calls, with the developer not realizing or caring that each is a process, and each call is a network call. Literally one service per function, with the completely expected result of horrible performance and high error rates.

They should’ve been called domain services or something.

Re: How Netflix really uses Java

#86
post #54

Earlier quoted context omitted.

Lol the Disney+ app UX is honestly terrible. Not to mention the regular app crashes on apple devices. Disney has _how_ much money to spend on their streaming services technology stack and they just... don't? Just feels like they'll piss on the customerwhen given the chance because people will still pay for that sweet Disney juice regardless.

What I find funny is that with that kind of money you could staff 10 app teams, develop the app 10 times in different ways and just pick the best one in the end.

Who picks? Likely that is the real problem.

Re: How Netflix really uses Java

#87
post #4

…let's say, your TV, or your iOS device will just do 10 network calls to these different microservices. It will just not scale at all. You would have a very bad customer experience. It would feel like using the Disney app. It's just not ideal. That’s some shade.

I don't think the experience is that much different between the different services, honestly. I vaguely have some recollection of Max being a bit bad, but don't remember the details. They are all fine. Except for YouTube, that's just leagues ahead of everything else.

I do find most are very similar.

The service type is a bit different, but IMO Peacock is the worst. None of the others are as consistently slow for me.

Re: How Netflix really uses Java

#88

I bought into the "RX Java/JS/etc.." years back. Everyone I showed the code couldn't handle it, and we just backed off to other methods, and things worked just fine. RX has some interesting ideas, but from a practical standpoint, at companies not netflix, it just doesn't work

Even at Netflix RxJava is not fully accepted. When I was there I wrote a service which called many downstreams. It orchestrated test user creation. I used RxJava because it was being pushed by the platform team, and coupled well with our internal GRPC api handlers. I shared with the team and people complained about the complexity… so I ended up ripping it out. What people wanted was a test user creation service that…

Is there any reason they don't adopt kotlin? It seems a lot simpeler with suspended functions and coroutines?Instead of RXJava.

Re: How Netflix really uses Java

#89
post #31

Earlier quoted context omitted.

There is a bug in the Roku app where if you close it and then re-open quickly it will hang on the profile login screen every, single time. Have to go back to Home again and re-open the app. Seems dumb, but I have 2 little kids and they both like to "pause" whatever show when it's time to turn the tv off. So after the first one does it, I have to do this dumb little dance to get the app to load again so the second one…

> they both like to "pause" My son also want to do this. Pause. Then turn the TV off. Maybe they believe the show will keep running with the TV off unless paused?

I have sometimes opened YouTube on my Roku to find it skipped part of a video I was watching, maybe because the Roku took time to close down after I turned off the TV by IR.

Better safe than sorry. ^S

Re: How Netflix really uses Java

#90

Earlier quoted context omitted.

> ...the async/await mess that C# created What do you find messy about it? Seems fairly straight forward, IME.

Not sure what the poster above was thinking of, but it seems kinda the same as every other language that’s adopted it - powerful, but footguns abound. I ran some async C# in a debugger - in Rider - the other month, and the debugger just goes off the deep end. Does C# have the same issue Python does with accidentally calling blocking code? In async Python - which I mostly quite like actually - it’s terrifying to bring…

.NET uses threadpool with hill-climbing algorithm. Each worker thread has its own queue and can also perform work stealing. However, if that is not enough and the work queues fill up faster than the items in them get processed, the threadpool will spawn additional threads until the processing lag is counteracted (within reason).

This historically allowed it to take a lot of punishment but also led to many legacy codebases to be really shoddily written in regards to async/await, where it would take some time for threadpool to find the optimal amount of threads to run or devs would just set a really high number of minimum threads, increasing overhead.

In .NET 6, threadpool was rewritten in C# and gained the ability to proactively detect blocked threads outside of hill-climbing algorithms and inject new threads immediately. This made it much more resilient against degenerate patterns like for loop + Task.Run(() => Thread.Sleep(n)). Naturally it is still not ideal - operating system can only manage so many threads, but it is pretty darn foolproof if not the most foolproof amongst all threadpool implementations.

As of today, it is in a really good spot and with tuned hill-climbing and thread blocking detection you would see the .NET processes have thread counts that more or less reflect the nature of the work they are doing (if you don't do any "parallel" work while using async - it will kill most threads, sometimes leaving just two).

Post reply on HN