Making a DB connection in a ziti overlay

I am working through using Ziti to connect to a DB… and I need help to understand the best way to approach this… considering what tools are available… and the effort required for a more advanced solution.

I don’t necessarily need solutions… rather… the approach and methodology. Specifically, I am running into a lot of challenges to do anything more than option 1 and option 2.

I look forward to add comments, suggestions and insights.

Option 1: Java Postgres ZJBDC
This is a great example, and I now have this working thanks to a lot of help from @TheLumberjack

Option 2: Tunnelling
I have also worked through a number of tunnelling options, where the database is hidden behind a Docker container… or… private compute.

Options for Python SDK?
I am currently working through how to connect to a Postgres database using the Python SDK.

I have a demo that uses psycopg2 using a Tuneller… but are not sure how to configure the MonkeyPatch for it. After looking at the source code of psycopg2, I am thinking that maybe what is needed is to inject the C SDK into the psycopg2 package and rebuild it

thoughts / suggestions

Options for Golang SDK?
This would be similar to the Python SDK… where I can setup a tunnelling configuration… but are still yet to explore how to do it native within the Golang SDK

Every single SDK environment works slightly differently which makes it hard to answer your question. The question is also a bit open-ended making it hard as well. It’s a lot easier for us to answer direct questions instead.

This is difficult, because to me, the approach and methodology is always the same but the implementation changes. The approach is to replace the underlay connection with an overlay connection. Some platforms make this easy and transparent (like java in seamless mode, or the monkey-patched python SDK). Some, like golang just have excellent abstractions available already to the SDK (and no, golang and java/python don’t work in the same way wrt a service with intercepts). Sometimes you need to use a ‘plugin’ approach like ZDBC.

I don’t think that’s very helpful, I’m sorry for that but I didn’t want this post to go unanswered. Not sure how to help further.

1 Like

Thanks for your thoughts. It helps because I have a lot of constraints on the technical engineering implementation of different SKDs.

I think I am pretty ok now to at least have a first step no matter what request someone came up with… as the tunnellers along with a private subnet allow you to isolate pretty much anything.

The question is then a matter of effort, time and cost for a more native implementation.

PS… I am going to look into the Golang db connections next to see how they could work. I have no idea yet how to approach this, but it something I am keen to learn more about. Let me know if you have any pointers to start with. :slight_smile:

I found this useful reference just now… which is a good starting point for other databases