Complete the code to define the central configuration server URL.
configServerUrl = "http://[1]:8888"
The config server URL should point to the central configuration server, commonly named 'config-server'.
Complete the code to fetch configuration from the config server using HTTP GET.
response = httpClient.get(f"http://config-server:8888/[1]/default")
The config server fetches configuration based on the application name, so 'application' is used in the URL.
Fix the error in the config client code to reload configuration on startup.
def load_config(): config = fetch_config_from_server() if config is None: raise [1]("Config not found") return config
Raising a RuntimeError is appropriate when configuration loading fails at runtime.
Fill both blanks to complete the config server's response handling code.
if response.status_code == 200: config_data = response.[1]() else: log.error("Failed to fetch config: " + response.[2])
The config data is parsed as JSON, and error messages are read as text from the response.
Fill all three blanks to complete the microservice config client initialization code.
class ConfigClient: def __init__(self, [1]): self.server_url = [2] self.config = self.[3]() def fetch_config(self): # fetch config logic here pass
The constructor takes 'config_server_url' as parameter, assigns it to 'server_url', and calls 'load_config' to initialize config.