You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DNS new feature (--dns) has possible policy values are:
preferIPv4: use IPv4 addresses, if available, otherwise fall back to IPv6 (the new default value).
preferIPv6: use IPv6 addresses, if available, otherwise fall back to IPv4.
onlyIPv4: only use IPv4 addresses, ignore any IPv6 ones.
onlyIPv6: only use IPv6 addresses, ignore any IPv4 ones.
any: no preference, use all addresses (the old k6 behavior).
But Local-IPs feature (--local-ips) does not allow mixed usage of IPv4/IPv6, since each VU will be allocated one IPv4 or one IPv6 in the initialisation stage.
maybe we can allow this option to accept mixed ipv4/v6 ranges/cidrs to create a IPv4 IPPool and a IPv6 IPPool. Then each VU will be allocated one IPv4 and one IPv6 addresses, that will be picked respectively for sending requests to DNS-resolved destination IP address.
The text was updated successfully, but these errors were encountered:
Hmm I'm not sure if I'd consider this a quite a bug, it's more like something between a bug and missing functionality... In any case, it's a very valid point we should address. However, as I mentioned in #1682 (review), I don't think we should complicate the global --local-ips option further.
Instead, I think fixing this should fall under the aegis of #1724. I haven't thought exactly how that API should look like, but here's a quick preliminary example:
Of course, you could randomly generate the actual IPs or pick them from a list sequentially with __VU and modulo division, or randomly with Math.random(), so that each VU has a different source IP... You should even be able to change the API on every iteration, if you want to, or in the middle of one. I think this is the simplest way to implement the full feature (no over-complicated global options), the most flexible one (you can implement whatever IP picking scheme you want, weights, you can even change the source IP whenever), and the most user-friendly one (it's very apparent what's happening, no magic).
The proposed vu.setLocalIPv4() and vu.setLocalIPv6() functions (or however we decide to call them) would also be usable without setting --local-ips at all. If both --local-ips and these functions are used, the local-ips values would just serve as the available pool of valid values for the functions, so an exception is thrown if the functions are called with some IP outside of the the specified local-ips. But if no local-ips is specified, users should be able to pick any IP that is available on the machine without any restrictions.
DNS new feature (--dns) has possible policy values are:
preferIPv4: use IPv4 addresses, if available, otherwise fall back to IPv6 (the new default value).
preferIPv6: use IPv6 addresses, if available, otherwise fall back to IPv4.
onlyIPv4: only use IPv4 addresses, ignore any IPv6 ones.
onlyIPv6: only use IPv6 addresses, ignore any IPv4 ones.
any: no preference, use all addresses (the old k6 behavior).
But Local-IPs feature (--local-ips) does not allow mixed usage of IPv4/IPv6, since each VU will be allocated one IPv4 or one IPv6 in the initialisation stage.
maybe we can allow this option to accept mixed ipv4/v6 ranges/cidrs to create a IPv4 IPPool and a IPv6 IPPool. Then each VU will be allocated one IPv4 and one IPv6 addresses, that will be picked respectively for sending requests to DNS-resolved destination IP address.
The text was updated successfully, but these errors were encountered: