kobolog / gorb

IPVS on steroids – REST API, heartbeats, service discovery and more
GNU Lesser General Public License v3.0
809 stars 83 forks source link

Unable to add "same" backend to multiple services #45

Open wociscz opened 7 years ago

wociscz commented 7 years ago

When i try to add same backend (with same name - hostname) i have got

{
    "error": "specified object already exists"
}

For example, i'm trying to have one host/backend in multiple services for http 80 and https 443. So hostname/backend the same, but i must "create" for the same host/backend different "name" ... The global uniqueness of backend name is not necessary - if i look at this from "perspective", or am i missing something..?

As workaround i'm creating backend name as hostname_portnumber, which is also "Bad" because one hostname with same port should be member of multiple services.. so as actual workaround of this i must creating backend name like servicename_hostname_port - it is ugly...

wociscz commented 7 years ago

hmm i see - the global uniqueness is maybe for "counters" - like uptime? should be possible to create this uniqueness only internally? just my 50cents

kobolog commented 6 years ago

Since services and backends are maintained as two separate maps, trying to create a new backend with the same particulars as the existing one would fail yeah. I think the right approach here would be to allow backends to be a part of multiple services, what do you think?