roadrunner icon indicating copy to clipboard operation
roadrunner copied to clipboard

[💡FEATURE REQUEST]: Size shortcut G, M support for configuration

Open OO00O0O opened this issue 4 years ago • 4 comments

Problem Now one gigabyte looks like 8000000000(bits) or 1073741824(bytes) in server.max_request_size if you like me and forget how conversion is done.

Solution Use G(gigabyte) M(megabyte) for describing sizes. This already implemented in php config too.

http:
    max_request_size: 256M

OO00O0O avatar Oct 08 '21 05:10 OO00O0O

Thanks for the FR @OO00O0O. Will be planned after v2.5.0 release. 👍🏻

rustatian avatar Oct 08 '21 05:10 rustatian

I have a few concerns about implementing this feature, because after getting the feedback, some people said, that M can be interpreted like (Mebibyte (1048576 bytes) or MegaBytes (100000 bytes)) as well as the G, B, etc which is ambiguous. I prefer to name configuration keys like max_request_size_bytes, rather than specifying the letter at the end of the number. But to do that, we need to update the whole configuration, which will possible after we introduce (v2.7) configuration versions. I'll wait for more community feedback on this ticket.

rustatian avatar Jan 10 '22 18:01 rustatian

@rustatian We had exact discussion today with my colleagues. My argument was comment in redis.conf first lines:

# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
# 1gb => 1024*1024*1024 bytes
#
# units are case insensitive so 1GB 1Gb 1gB are all the same.

Anyways, this issue does not bring any actual value to RR and it's more "nice to have". Thank you for your attention :)

OO00O0O avatar Jan 11 '22 19:01 OO00O0O

You are very welcome. Let's wait for more feedback on this, might be just specifying comments on such fields will be sufficient 😃

rustatian avatar Jan 11 '22 19:01 rustatian

Thanks for the FR @OO00O0O 👍🏻 , but since no one actually not interested in that for the 1.5 years, closing it.

rustatian avatar Mar 24 '23 01:03 rustatian