Report this

What is the reason for this report?

Requests over VPC

Posted on May 26, 2020
mfnx

By mfnx

I have 2 droplets, say W (where I host my website) and C (a computing unit).

The user enters input on W which must be sent to C (I do this with ssh over the private network). On C, the input is received and an output is stored in a file. I need to publish that file in a database on W, and I would like to do this over the private network as well. Instead of doing this with ssh, I thought it might be a better choice to do it with a request (with python), so I could treat the request easily on W and store the payload (the file) in the database.

Is this do-able? I’m just a beginner. Would this work like any request over the public network or would I have to tweak my setup on W? (nginx + uwsgi + django).



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I should have tried it before asking (I wasn’t sure how to). So, it seems that, when I do a request from C to W on the public IP (using python3 and the requests module), I get exactly the same result as when I do the request on the private IP. I wonder how that is possible, but I guess digitalocean just did a good job. If anyone has some input, I’d be glad to read it.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.