Both are possible. The first one is to embed web containers, which is also a popular method now. It does not require any dependencies or additional maintenance of the container environment, and it is also decoupled from each other. Imagine you have two applications deployed in the same tomcat, how to isolate them safely? How to use different IP? But if it is in the form of a jar package, you can use technologies such as docker to isolate and use different IPs.
A small weakness of the built-in type is that the bag is a bit larger
The service container is a standalone startup program, because the background service does not require the functions of Web containers such as Tomcat or JBoss. If you insist on using a Web container to load the service provider, it will increase complexity and waste resources.
The jar file has good running performance and is relatively simple. You can maintain and open/close the dubbo service through scripts.
Of course, if your project itself is a web service, just use tomcat/jboss directly, and maintenance is also convenient
Both are possible. The first one is to embed web containers, which is also a popular method now. It does not require any dependencies or additional maintenance of the container environment, and it is also decoupled from each other. Imagine you have two applications deployed in the same tomcat, how to isolate them safely? How to use different IP? But if it is in the form of a jar package, you can use technologies such as docker to isolate and use different IPs.
A small weakness of the built-in type is that the bag is a bit larger
Quote from the dubbo user manual:
The jar file has good running performance and is relatively simple. You can maintain and open/close the dubbo service through scripts.
Of course, if your project itself is a web service, just use tomcat/jboss directly, and maintenance is also convenient