Skip to content
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

Remove support for multiple connection in a single server #3572

Closed
hueniverse opened this issue Sep 14, 2017 · 10 comments
Closed

Remove support for multiple connection in a single server #3572

hueniverse opened this issue Sep 14, 2017 · 10 comments
Assignees
Labels
breaking changes Change that can breaking existing code
Milestone

Comments

@hueniverse
Copy link
Contributor

hapi is (probably) the only framework that supports adding multiple ports to a single server instance. This was done for two use cases:

  • Support an internal process admin channel (serve normal API over port 8000 and allow internal admin access on port 8001)
  • Run multiple services in a single process for testing purposes (run a single server that have both your "login" and "billing" APIs, each on a different port)

At this point, external tools would do as good a job at allowing you to manage multiple servers, each with a single port.

@hueniverse hueniverse added the breaking changes Change that can breaking existing code label Sep 14, 2017
@hueniverse hueniverse added this to the 17.0.0 milestone Sep 14, 2017
@gr2m
Copy link

gr2m commented Sep 14, 2017

I’m working heavily with hapi for several years now, I can’t recall a single situation where we had depended on the multiple connections. On the other side, I do recall it being a bit confusing when starting to work with hapi. If you were to remove this feature, I think the onboarding would be much easer. Big +1 from me 💯

@kpdecker
Copy link
Contributor

Would still be possible to spin up another server instance in the same process, no?

@hueniverse
Copy link
Contributor Author

@kpdecker yep. Just need to reuse the config.

@diegobfernandez
Copy link

O agree 100% with @gr2m, I think the cognitive overload of multiple connections is not worth It.

@janl
Copy link

janl commented Sep 14, 2017

I’ve used this before and found it handy for the reasons outlined, but the workaround in #3572 (comment) would be more than acceptable.

I too agree that the initial setup simplification alone is worth removing that feature.

@hueniverse hueniverse self-assigned this Sep 14, 2017
@bleupen
Copy link

bleupen commented Sep 15, 2017

We use this feature all the time to redirect http requests on port 80 to use ssl

@axpro
Copy link

axpro commented Sep 15, 2017

I find it useful. I love that you can load plugins per connection. One use case is private routes for cache invalidation.

@mattiloh
Copy link
Contributor

I like the possibility to load plugins for specific connections, too. Is there any other way to restrict the effect of a plugin to certain routes or path-prefixes (e.g. a plugin should only affect /admin/* routes)?

@hueniverse
Copy link
Contributor Author

@Mattii You just just losing the ability to select connections because there is always just one. The rest of the plugin options remain.

@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking changes Change that can breaking existing code
Projects
None yet
Development

No branches or pull requests

8 participants