Article directory
nacos
architecture
- client -> server <- admin。
- Server-side persistence can be simplified to a built-in Derby memory database.
configuration update
- HTTP pulls configuration from server long polling . The request is delayed and blocked in the server queue.
- The server task scans the key update, writes the changed configuration into the response object, and returns the result.
- Check the configuration after 29.5 seconds of no change blocking (client timeout 30 seconds), write the result of the check into the response object, and return the result.
- The client checks the configured md5 , and calls the listener to notify the change event if it is inconsistent.
concept
- Nacos configuration level and project correspondence:
apollo
architecture
- The simplest deployment architecture.
- distributed architecture .
configuration update
- The server regularly scans and updates the configuration
- ReleaseMessage implementation method:
- The admin server writes the mysql table.
- The task of the config server scans the update records.
- ReleaseMessage implementation method:
- Client cache configuration (memory + files).
- Push implementation method: same as nacos http long polling .
Compared
apollo | nacos | |
---|---|---|
push method | HTTP long polling | HTTP long polling |
client storage | memory+file | memory+file |
minimal deployment | config+admin+portal+mysql | sever+ embedded db or mysql |
authority management | complex | Simple |