Thoughts on dubbo [original]

Recently, I was reading dubbo's documentation, and some content combined with my own thinking to record
1. Dubbo's local stub can improve performance.
Move the code unrelated to the server environment to the stub, and use the ThreadLocal local cache to verify and fault tolerance (mock for fault tolerance). Better, the principle is similar) and other functions are done on the client side, which should improve performance. This code is written by the server and cached in the past, so maintenance is also convenient.
2. Use future to implement asynchronous calls to improve performance. The
waiting time is the longest remote call event, and it is completed in one thread, avoiding the overhead and complexity of multi-thread switching.
3. Use injvm to improve the performance of local jvm calls
4. I don't understand callback, my understanding should be that the client registers the callback, and the server finds the callback call. And the server and the client are in a long connection, and once the server changes, it will initiate a call notification.
5. If spring loading reports wait to lock, it may be caused by premature exposure of dubbo service, set
<dubbo:service delay="-1" />
6. Provide stateful service
<dubbo:protocol name="dubbo" sticky= "true" />
7. The configuration reference manual indicates the role of the configuration. If you want to perform performance tuning, you can find the configuration items for performance tuning.
8. Configure the cache file, you can cache the registry and service providers, and restart from this File recovery. When the registry is down, the list of service providers can be obtained from the cache. Be careful not to use the same file for multiple applications.
<dubbo:registry file=”${user.home}/output/dubbo.cache” />
9. From the test report on the official website, it is good to use http protocol + json serialization for large data volume calls, and to use dubbo protocol hassian serialization for small data volume (1k or POJO) (note that dubbo serialization is a trial).
10. From other reference materials, dubbo protocol + kryo serialization is better than hassian serialization.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327036966&siteId=291194637