Hi Imesh,

Yes, we already add labels such as appname and version as of now to
kubernetes entities for the purpose of tracking. Further more we plan to
add service port also in service labels to differentiate http and https
services from our side.

@Pirin: Do we have a formula to generate 24 character hash based on app
name and version? If so please share it. IMO we should consider port as
well while generating the hash.

On Fri, Mar 4, 2016 at 11:49 AM, Imesh Gunaratne <[email protected]> wrote:

>
>
> On Fri, Mar 4, 2016 at 11:38 AM, Pirinthapan Mahendran <
> [email protected]> wrote:
>
>> Hi Imesh and Lakmal,
>>
>> Thanks for the replies. Since the generated hash value is sufficient, we
>> are going with that solution.
>>
>
> +1 It might be better to add labels to the services including their
> metadata (ex: application-id, version, etc).
>
> Thanks
>
>>
>> Thanks,
>> Pirinthapan.
>>
>>
>>
>> Mahendran Pirinthapan
>> Software Engineer | WSO2 Inc.
>> Mobile +94772378732.
>>
>> On Fri, Mar 4, 2016 at 11:13 AM, Lakmal Warusawithana <[email protected]>
>> wrote:
>>
>>>
>>>
>>> On Fri, Mar 4, 2016 at 9:33 AM, Lakmal Warusawithana <[email protected]>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Thu, Mar 3, 2016 at 9:42 PM, Pirinthapan Mahendran <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> In AppCloud, when deploying application in Kubernetes we are using the
>>>>> following pattern as the service name.
>>>>>
>>>>> *<Application Name>-<Version>-<Port>*
>>>>>
>>>>> We are using the above pattern because a particular Application can be
>>>>> identified by Application Name and Version within a tenant.
>>>>>
>>>>> But Kubernetes limits the number of characters of this service name to
>>>>> 24. According to our current implementation, the version can have maximum
>>>>> of 13 character. So if we consider these limitations, the Application Name
>>>>> can have only 6 characters. So we are trying to come up with a solution to
>>>>> increase the length of the application name.
>>>>>
>>>>> Initially we thought about using UUID as primary key and replacing 
>>>>> *'<Application
>>>>> Name>-<Version>' *with the UUID. But according to the standared, UUID
>>>>> has 36 characters. So we cannot use UUID.
>>>>>
>>>>> Currently we have the follwoing two options to solve this issue.
>>>>>
>>>>> 1. Using auto generated id of mysql database, which is generated
>>>>> during adding application, instead of *'<Application Name>-<Version>'*.
>>>>> But its not the recommonded way to use the auto generated id outside to
>>>>> database.
>>>>>
>>>>> 2. Defining our own hash function to generate a 24 character string
>>>>> instead of *'**<Application Name>-<Version>-<Port>'*.
>>>>>
>>>>>
>>>> Do we need port listed in service name? If not we can get 10
>>>> characters.  For readable and traceable purpose better to have app name and
>>>> version. Why do we need 13 character version here, can't we reduce it?
>>>>
>>>
>>> As we discussed, since app name, version and port are in the service
>>> labels, we can use generated hash value for service names
>>>
>>>
>>>
>>>>
>>>>
>>>>> Could you please share your opinion on the above options?
>>>>>
>>>>> Thanks & Regards,
>>>>> Mahendran Pirinthapan
>>>>> Software Engineer | WSO2 Inc.
>>>>> Mobile +94772378732.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Lakmal Warusawithana
>>>> Director - Cloud Architecture; WSO2 Inc.
>>>> Mobile : +94714289692
>>>> Blog : http://lakmalsview.blogspot.com/
>>>>
>>>>
>>>
>>>
>>> --
>>> Lakmal Warusawithana
>>> Director - Cloud Architecture; WSO2 Inc.
>>> Mobile : +94714289692
>>> Blog : http://lakmalsview.blogspot.com/
>>>
>>>
>>
>
>
> --
> *Imesh Gunaratne*
> Senior Technical Lead
> WSO2 Inc: http://wso2.com
> T: +94 11 214 5345 M: +94 77 374 2057
> W: http://imesh.io
> Lean . Enterprise . Middleware
>
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
*Kasun de Silva*
Software Engineer | *WSO2 Inc.*; http://wso2.com
lean.enterprise.middleware

email   : [email protected]
mobile : +94 77 794 4260
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to