You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/01/18 06:56:41 UTC

[GitHub] [skywalking] xuanyu66 opened a new issue #6222: dns resolve for skywalking trace receiver service addresses

xuanyu66 opened a new issue #6222:
URL: https://github.com/apache/skywalking/issues/6222


   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [X ] Question or discussion
   - [ ] Bug
   - [ ] Requirement
   - [ ] Feature or performance improvement
   
   ___
   ### Question
   - What do you want to know?
   I want to add dns resolver for the domain of  skywalking trace receiver service
   -  WHY ?
      - It's hard to maintain agent config
   `collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES:127.0.0.1:11800}
   `
      - If extending OAP service, we must restart all service.
     
   
   - HOW ?
     - In this situation, I want to set domain to this variable.The domain has a number of A records
     - modify the method boot() of GRPCChannelManager, check whether it is domain, if so ,then resolve it ,and add all ip addresses to serverList
   ```
    public void boot() {
           if (Config.Collector.BACKEND_SERVICE.trim().length() == 0) {
               LOGGER.error("Collector server addresses are not set.");
               LOGGER.error("Agent will not uplink any data.");
               return;
           }
           grpcServers = Arrays.asList(Config.Collector.BACKEND_SERVICE.split(","));
           // resolve all domain to ip and add to server List
           connectCheckFuture = Executors.newSingleThreadScheduledExecutor(
               new DefaultNamedThreadFactory("GRPCChannelManager")
           ).scheduleAtFixedRate(
               new RunnableWithExceptionProtection(
                   this,
                   t -> LOGGER.error("unexpected exception.", t)
               ), 0, Config.Collector.GRPC_CHANNEL_CHECK_INTERVAL, TimeUnit.SECONDS
           );
       }
   
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng closed issue #6222: dns resolve for skywalking trace receiver service addresses

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #6222:
URL: https://github.com/apache/skywalking/issues/6222


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng closed issue #6222: dns resolve for skywalking trace receiver service addresses

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #6222:
URL: https://github.com/apache/skywalking/issues/6222


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng commented on issue #6222: dns resolve for skywalking trace receiver service addresses

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6222:
URL: https://github.com/apache/skywalking/issues/6222#issuecomment-762091137


   Hi, thanks for asking. I think DNS period resolving mechanism could be added, but should be optional, and default OFF.
   What do you think?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] xuanyu66 commented on issue #6222: dns resolve for skywalking trace receiver service addresses

Posted by GitBox <gi...@apache.org>.
xuanyu66 commented on issue #6222:
URL: https://github.com/apache/skywalking/issues/6222#issuecomment-762172760


   yes, exactly.
   Do we need a new agent config called collector.backend_service.dns_period_resolve?
   And start a scheduled thread to resolve dns periodically.
   Need some advice
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng commented on issue #6222: dns resolve for skywalking trace receiver service addresses

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6222:
URL: https://github.com/apache/skywalking/issues/6222#issuecomment-762271903


   I think we don't need a new scheduler? The timer(thread) is a sensitive resource in the agent core. Consider adding this in `GRPCChannelManager`?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org