New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rgw: beast frontend can listen on multiple endpoints #20188
Conversation
this allows us to configure multiple values for a given key without resorting to string formatting to cram them into a single key/value pair ex. port=80 port=443s instead of port=80+443s Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_asio_frontend.cc
Outdated
return port; | ||
} | ||
|
||
tcp::endpoint parse_endpoint(std::experimental::string_view input, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does Ceph have any policy on std::experimental
? What about using boost::string_view
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, thanks for reminding me about this part
i had found that boost::asio::ip::make_address()
wouldn't accept boost::string_view
or std::string_view
, so this was the only form that would compile. but now that i look closer (http://www.boost.org/doc/libs/1_66_0/boost/asio/detail/string_view.hpp), there are typedefs for string_view
/basic_string_view
in namespace boost::asio
that i can use instead
rgw_frontends options port= and endpoint= can be given multiple times, and the beast frontend will listen on each endpoint Fixes: http://tracker.ceph.com/issues/22779 Signed-off-by: Casey Bodley <cbodley@redhat.com>
02a87c8
to
1bff073
Compare
thanks @rzarzynski, updated to use the same |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
extends the frontend configuration to store options in a multimap, so that
port
andendpoint
can be specified multiple times. the beast frontend creates a separateListener
for each port/endpoint given, and thisListener
instance is passed as an extra argument whenaccept()
ing new connections. the civetweb frontend also supports multipleport
optionsFixes: http://tracker.ceph.com/issues/22779