question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamically adding and removing a service

See original GitHub issue

Let’s imagine an API gateway with some schema validation where each route has its own schema for its request body. The list of routes and schemas are retrieved in runtime from some centralized registry. The route and schema can be added, removed or updated.

For Armeria to support this scenario, we need the following updates:

  • Provide a way to add and remove a Service from a Server without restarting a Server.
    • Service will need additional life cycle callbacks.
  • Provide a way to add and remove a gRPC and Thrift service from GrpcService and THttpService.
  • Improve DocService to reconfigure itself on server configuration changes.
    • ServerListener will need additional life cycle callbacks, e.g. routeAdded, routeRemoved.

Related conversation: https://line-armeria.slack.com/archives/C1NGPBUH2/p1598973931015200

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:21 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
aio64commented, Jun 21, 2021

Magic thanks, will pull, integrate and explore the TLS caveat and report anything that may be noteworthy.

2reactions
trustincommented, Jun 22, 2021

@amitvc’s PR has been merged. This means, you can update the service bindings without restarting a server, with some limitations:

  • TLS settings cannot be changed without restarting a server yet; and
  • the services being removed will not be notified of removal, which may cause a problem to a service that performs an action when the server stops, such as TomcatService and JettyService.

The next step would be to address the above limitations.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamically add, insert and remove BLE services at run time ...
The only way to remove a service dynamically is to disable the SoftDevice completely, re-enable it, and configure it without the service you ......
Read more >
Dynamically Add and Remove Users to/from Group
Solved: Hello, We are looking to set up a automated process to add users to a specific group and remove them dynamically once...
Read more >
Dynamically ADDING and REMOVING Components in Angular
What you're trying to achieve can be done by creating components dynamically using the ComponentFactoryResolver and then injecting them into ...
Read more >
systemd: how do I create/destroy instances dynamically when ...
I want to have a service with several instances, each of which has a configuration file; when configuration files appear and disappear, ...
Read more >
Dynamically Adding or Removing Nodes in a Cluster
From the Management Console or the Console's REST API you can dynamically add or remove nodes to or from a cluster without disbanding...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found