Hard-coded ip, a good idea?

while looking over the source code i found that the cores are connecting to a hard-coded ip in the amazon cloud.

Is this a good idea? what if due to a fluke at amazon you lose the ip? then all cores are bricked unless people flash them over USB.

Wouldn’t it be better to have them connect to a dns name instead? then you could round-robin it to diferend locations and have some failover.

Remco

Yup @remcohn, absolutely true, which is why we’re extremely careful when changing anything in amazon—think multiple people turning the nuclear launch keys at the same time. :wink:

Moving from an IP to DNS is already on our roadmap. Thanks for the suggestion!

If DNS is baked into the core firmware, will there be a function then for user programs to lookup IPs based on a string of the domain name?

2 Likes

Excellent idea @Swieter; I added it to our backlog.

Hi @zachary could you give us an expected timeline on this, because the issue crept up on me just now. I’m using a TCPClient connecting to my server on AWS and I carelessly asked for a renewal of my IP :slight_smile:

Hi @nitred

Is your problem DNS (get an IP address from a host name)? TCPClient.connect() takes a char* argument for a host name in one of it overloads, you have that already for TCPClient.

So if you have a DNS record for your AWS host, you can just connect by name.

@bko Oh yes! I thought it did not exist. Thank you so much :slight_smile:

1 Like

Also, to be clear, DNS was also completely baked into the core-firmware for the Spark Cloud connection back at the beginning of March. Cheers!

2 Likes