Page MenuHomePhabricator

[services][blob] Add http_port config option
ClosedPublic

Authored by bartek on Apr 13 2023, 11:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 26, 8:06 PM
Unknown Object (File)
Sun, Dec 15, 6:23 AM
Unknown Object (File)
Sun, Dec 15, 6:23 AM
Unknown Object (File)
Sun, Dec 15, 6:23 AM
Unknown Object (File)
Sun, Dec 15, 6:20 AM
Unknown Object (File)
Thu, Dec 12, 7:59 PM
Unknown Object (File)
Dec 7 2024, 7:30 AM
Unknown Object (File)
Dec 5 2024, 2:26 AM
Subscribers

Details

Summary

A preparation to introduce HTTP server (ENG-3520).

Renamed --port CLI option to --grpc-port and added another --http-port option. Both gRPC and HTTP servers will be able to run concurrently.

Also changed the type to u16 to make it compatible with actix-web API I'm going to use.

Depends on D7440

Test Plan

Build and run the blob service, play with --grpc-port CLI option to ensure it changes ports. The new --http-port will be tested when HTTP server is introduced (two diffs later)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Apr 13 2023, 11:24 PM
jon requested changes to this revision.Apr 14 2023, 9:20 AM
jon added inline comments.
services/blob/src/grpc.rs
31 ↗(On Diff #25151)

As mentioned in https://linear.app/comm/issue/ENG-3520#comment-ead5102f, I think we should have separate ports for http and grpc calls; at the very least to avoid routing issues between the two paradigms.

This revision now requires changes to proceed.Apr 14 2023, 9:20 AM
services/blob/src/grpc.rs
31 ↗(On Diff #25151)

What's the point of this if only one of them can be active at a time? See D7444

bartek retitled this revision from [services][blob] Rename grpc_port -> listen_port to [services][blob] Add http_port config option.Apr 18 2023, 12:57 AM
bartek edited the summary of this revision. (Show Details)
bartek edited the test plan for this revision. (Show Details)

As discussed on Linear, changed the diff to add a separate --http-port option in addition to the gRPC one so both servers can run concurrently.
Also updated D7444 to reflect the changes.

This revision is now accepted and ready to land.Apr 18 2023, 8:19 AM