0

I am creating an application server using firebird 3 embedded for the database. A connection pool usually speeds up things for short connections that make one transaction and disconnect. But does this also apply for embedded firebird where no authentification and no network things take place on connect?

2
  • why would you want to disconnect? also, what about prospects of future scaling your application up into using stand-alone server by mere change in connection string (configuration) ? Commented Aug 30, 2019 at 20:14
  • I leave retaining the connections up to the webmodule. My application will be stateless and use jwt for rights/role and all other information. In my current (old} implementation I have DB sessions across the network that sometimes break and are difficult to restore apart from the fact that 90% of the time no database access is needed and transactions are short because with thr new application Server I can now move all longer running stuff like complex queries and reports to the server and the client can download the result once it is ready. In terms of scaling I was hoping never to have the ne Commented Aug 31, 2019 at 5:38

1 Answer 1

2

Creating a connection with Firebird Embedded has a lot less overhead than creating a connection to Firebird server (especially over a non-local network connection). In that regard, using a connection pool with Firebird Embedded provides less benefits than for a networked connection.

However, using a connection pool might still provide some benefits. For example, various caches will be retained and reused, like the metadata caches, page buffers and possibly some filesystem related caches. Whether that benefit is big enough to warrant a connection pool, I'm not sure, and I'm not aware of any benchmarks.

This is cheaper to try and measure if you're using a language were connection pool implementations are already available compared to first having to implement it yourself. For example, for C# (.net), the Firebird ADO.net provider contains one (which is enabled by default), and for Java, there are a lot of third party connection pool libraries available.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, implementing pooling is easy also in Delphi but as my completed and unittested delphi db class contains functions that cannot be pooled (create database e.g.) therenis effort to adapt that class. I think I leave this open as a potential tuning option...

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.