Комментарии:
If something breaks on IPv6 for you, you or the software you're running is the problem. The address family is not to blame for the fact that a program cannot open a socket on v6.
Ответить2% of what exactly? Performance?
Ответитьalso CORS issues. localhost can get funky w/ cors.
ОтветитьI don't believe the 2% improvment. Will need proofs
ОтветитьThe one case where using magic numbers over a conventional descriptive name proves to be more adequate...
ОтветитьAm I really the only like on this video or is YT poopin’?
ОтветитьIPv6 sucks. Not a programmer…networking and info sec guy. It suuuuucks for any local network
ОтветитьA 2% reduction in latency is not a 2% reduction in server costs, not even close. It's still a nice win.
But I'm wondering, wouldn't it be much better to change the config to look up ip v4 first and continue using localhost? I assume that must be possible.
How much he'd save if he used an OS that works out of the box instead of spending a huge amount of time figuring out why the wireless driver no longer fits the kernel every distro upgrade?
ОтветитьI'm not sure I trust this metric of 2% savings. 2% of what? An initialization time? Or... why are you resolving localhost a few times a second?
ОтветитьCounting syscalls while using Python sounds like an April fool's joke.
ОтветитьWe all know that localhost lookup doesn't make any DNS requests on any Linux distro. libnss just reads it from /etc/hosts.
ОтветитьWe were severely limited with ipv4 namespace, then NAT happened to
Ответитьthere is the option to completely disable ipv6 on the host and none of this would even be an issue. Unless you are part of the .001 percent of people out there actually using ipv6
ОтветитьOn the topic of IPv6 breaking things, I came up with a system for a university research project that would expand IPv4's address range from 4 billion to 280 trillion. It involved converting the 16 bits used for packet fragmentation into an address extension, based on a study I ran which showed that packet fragmentation is rarely used in real-world web traffic these days. I also discovered that companies were collectively paying around US$1 billion per year (in 2019) to buy IPv4 addresses from organisations which had been hoarding them over time, so there's actually a pretty big financial incentive for tech companies to invest in the change.
ОтветитьOne of the biggest improvements that I ever made to a service was optimisation of SSL/TLS cipher ordering.
ОтветитьI'm going to use localhost. I don't care what the video says
Ответитьnobody uses docker runs
ОтветитьThis doesnt make much sense in enterprise level. You rarely use local host to reach any other service.
ОтветитьI think this is wrong solution for the problem.
With asumption that /etc/hosts lookup doesn't cost anything and real problem was trying to first resolve ipv6 just mean there is missconfiguration in vm/containers itself. And correct solutiotion would be properly configure /etc/hosts and remove ::0 if you don't support ipv6.
Replacing hostname with ip address doesn't really sounds good.
those stupid idiots using localhost
flicks straight back to my other tab localhost:3000
breaking on IPv6 is a bug
ОтветитьAll seasoned python programmers know about this already. Ran into this same problem 4 years ago. Back then the dns lookups were really slow sometimes too.
ОтветитьAre people using localhost in production environment? How/Where?
In my world, "localhost" gets overwritten via settings/conf/env in prod by actual DNS addresses (i.e. DB, rabbitmq). I only use it in local development and e2e testing.
Maybe, just maybe, the correct solution is to keep using localhost and disable ipv6 on your host if you're not using it.
Working to enable ipv6 in production and man do I hate everybody who does this, since this is operating systems concern, not program's.
Me, a single dev: wondering if the 2% efficiency boost over the course of my life time per hot reload is > or < the 8 minutes spent watching this video, + the time it takes to lookup my ip each computer startup.
ОтветитьProgrammers talking about networking is HILARIOUS lmao
Ответитьexpose the port and use localhost
ОтветитьNobody supports IPv6 because nobody supports IPv6
Ответить"to be fair, you are using python"... which is ok if you're a semi-human and need to communicate codey ideas to other semi-humans.
ОтветитьVery true, I've used this in the past to fix an issue I had using xamp and myphp admin on Mac.
ОтветитьDisable IPv6 on all your net adapters and disable Toledo virtual NIC. Problem solved.
ОтветитьDon't trust anyone who still uses "Command prompt". Seriously
Ответитьso I should use localhost because someones shitty macbook did not work properly ?
ОтветитьI feel like this take completely ignores python virtual machines for distributions
Ответитьwhat a nonsense. every idiot knows that a call to getaddrinfo() is slower than hardcoding the IP. and "no", getaddrinfo() is NOT a syscall, it comes from libc and is not a passthrough. oh wait. he is doing what? using windows?? oh lord. no idea where they implemented it there.
Ответить😆 why the shade on python? Amazing content 😆
ОтветитьSome of us become chads at different rates
ОтветитьMeanwhile (in our universe):
BenchmarkDotNet v0.13.8, macOS Ventura 13.6 (22G120) [Darwin 22.6.0]
Apple M2 Max, 1 CPU, 12 logical and 12 physical cores
| Method | Mean | Error | StdDev | Ratio | RatioSD |
| ConnectToLocalhost | 71.14 us | 1.208 us | 1.438 us | 1.00 | 0.00 |
| ConnectTo127 | 71.19 us | 1.389 us | 1.706 us | 1.00 | 0.03 |
Because hostname resolution is cached in memory and is just one memory access away. You must be doing something terribly wrong if you can measure 2% difference in resolving cached hostname...
Python is so slow py dev had to care about performance, meanwhile js dev can just write poopoo code and imagine it being blazingly fast because v8
ОтветитьSame problem pops up when using MongoDB
Currently using a MacBook Pro 🥲
On Linux when you listen on IPv6 localhost you can get both IPv6 and IPv4 connections from the socket because IPv6 is awesome
ОтветитьFor the record I didn’t know if it’s not DNA it’s always ipv6, so no not everyone knows what you know…
Is it the misconfigurations or compatibility problems that lead to service disruptions??
If you aren't forcing an address family on getaddrinfo lookups, then ALL lookups have the potential to return IPV6. Google, Microsoft, Apple, etc. all have IPV6 addresses.
Ответитьi like how prime is like "we need to migrate to ipv6 but it's a pain" watching a video advocating hard coding an ipv4 address into stuff, which is one of the things making migration a pain lol
ОтветитьIf your code wants IPv4, maybe pass an address family to getaddrinfo?
ОтветитьSo what happens if you're on an ipv6 only machine?
Ответить